2018-10-24 08:08:36 -04:00
|
|
|
---
|
|
|
|
title: Bash shutdown
|
|
|
|
---
|
|
|
|
|
2019-05-17 07:03:13 +01:00
|
|
|
## Bash Command: shutdown
|
2018-10-24 08:08:36 -04:00
|
|
|
|
2019-05-17 07:03:13 +01:00
|
|
|
Typing the shutdown command will schedule your system to be shutdown at a given point in time.
|
2018-10-24 08:08:36 -04:00
|
|
|
|
2019-05-17 07:03:13 +01:00
|
|
|
### Usage
|
2018-10-24 08:08:36 -04:00
|
|
|
|
2019-05-17 07:03:13 +01:00
|
|
|
```bash
|
2019-06-11 08:04:49 -07:00
|
|
|
shutdown [options] [when] [message]
|
2019-05-17 07:03:13 +01:00
|
|
|
```
|
2018-10-24 08:08:36 -04:00
|
|
|
|
2019-06-11 08:04:49 -07:00
|
|
|
#### Options
|
2018-10-24 08:08:36 -04:00
|
|
|
|
2019-06-11 08:04:49 -07:00
|
|
|
* `-h`, shutdown then halt the system
|
2018-10-24 08:08:36 -04:00
|
|
|
|
2019-06-11 08:04:49 -07:00
|
|
|
* `-r`, will trigger a restart of the system after shutting it down
|
2018-10-24 08:08:36 -04:00
|
|
|
|
2019-06-11 08:04:49 -07:00
|
|
|
* `-c`, cancel a planned shutdown
|
|
|
|
|
|
|
|
* `-P`, shutdown then power down
|
|
|
|
|
|
|
|
* `-k`, do not shutdown, but send the message as if you were
|
|
|
|
|
|
|
|
#### When
|
|
|
|
|
|
|
|
* `now`, triggers an immediate shutdown (still displays any message specified)
|
|
|
|
|
|
|
|
* `hh:mm`, shutdown initiates at the specified hour(`hh`) and minute(`mm`)
|
|
|
|
|
|
|
|
* `+m`, wait `m` minutes before inititiating shutdown
|
|
|
|
|
|
|
|
#### Message
|
|
|
|
|
|
|
|
* Adding a message to the end of the command will display a message of your chosing prior to shutting it down.
|
2018-10-24 08:08:36 -04:00
|
|
|
|
2019-05-17 07:03:13 +01:00
|
|
|
#### More information:
|
|
|
|
|
|
|
|
* SS64: https://ss64.com/bash/shutdown.html
|