shutdown command linux code example

Example 1: shut down instantly on linux

sudo shutdown now

Example 2: shutdown linux pc

# schedule shutdown 1 minute from now
shutdown

# schedule shutdown 15 minutes from now
shutdown +15

# schedule shutdown at 23:00
shutdown 23:00

# shutdown immediately
shutdown now

# cancel shutdown
shutdown -c

Example 3: shutdown debian

$ sudo poweroff

or
$ sudo shutdown -h now

Example 4: shutdown command linux

#The shutdown command is used and the computer will shutdown in a minute.
shutdown

Example 5: write a script to shutdown at a time in linux

shutdown -h 21:45

Example 6: shut down computer in terminal linux

sudo poweroff

Tags:

Misc Example