Linux Command: Restart: Reboot or Shutdown

 
How to turn off or reboot the popular Linux versions: If you ever get lost on the Linux console of a server, PC, tablet, TV, media player, radio, router or any other Linux-based device, you can usually reboot the system with the "reboot" command.

Aim of this article

HowTo: Linux computer
shutdown or reboot

Effort

Reading time: approx. 4 Minutes

Prerequisite

Linux Device, Server or PC
The "shutdown" command can be used to shut down or reboot the system. The console can be called, depending on the device, via the connected screen or via telnet or putty from another computer over the network.

in short:

Action Command
reboot reboot
Shutdown shutdown

Terminal

Start the terminal:

or connect from a terminal to another computer over the network using SSH:

ssh user@192.168.1.xx  

Restart command

A Linux computer or a device with Linux installed can usually be restarted with the help of the following command:

reboot

Alternatively, the reboot also works via this command

shutdown -r 0 

or

init 6

If there are not enough rights for restarting or shutting down, either a password prompt will appear:

or the following or a similar error:

shutdown: administrator rights ("root" rights) required

Here helps with Ubuntu, for example, the "sudo" command, so:

sudo shutdown -r 0
sudo reboot

or

sudo init 6

Shutdown command

Switch off or shut down goes with the command

shutdown -h 0 

oder

init 0

Ubuntu, maybe:

sudo shutdown -h 0 

or

sudo init 0

Reboot command details

reboot --help

Call: reboot [OPTION]...

Restart the system.

Options:

-n, --no-sync don't sync before reboot or halt
-f, --force force reboot or halt, don't call shutdown(8)
-p, --poweroff switch off the power when called as halt
-w, --wtmp-only don't actually reboot or halt, just write wtmp
record
-q, --quiet reduce output to errors only
-v, --verbose increase output to include informational messages
--help display this help and exit
--version output version information and exit

This command is intended to instruct the kernel to reboot or shutdown the system.
or shutdown; if it is called without the -f option, or if the system is in any
the system is in a runlevel other than 0 or 6, it will execute
execute /sbin/shutdown.

Shutdown command details

~ $ shutdown --help

Call: shutdown [OPTION]... ZEIT [NACHRICHT]
Shut down the system.

Options:

-r reboot after shutdown
-h halt or power off after shutdown
-H halt after shutdown (implies -h)
-P power off after shutdown (implies -h)
-c cancel a running shutdown
-k only send warnings, don't shutdown
-q, --quiet reduce output to errors only
-v, --verbose increase output to include informational messages
--help display this help and exit
--version output version information and exit

crontab Reboot : automatic reboot

For an automatic reboot at specific times, see: Linux crontab Reboot

positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Questions / Comments


By continuing to browse the site, you agree to our use of cookies. More Details