How to Restart Linux with the Command line - Bash

You can shutdown or restart your desktop or server with a simple command in bash. It could come in very handy if you ssh into your server or desktop. In this example I a doing it in on Arch Linux with a sudo user. The same commands can be applied in just about any linux distribution such as Ubuntu. You often have to issue the commands as the root user or with sudo in front of the command. (Example: sudo shutdown -r now)

Open up a terminal window

To restart your computer right away type in sudo shutdown -r now







Enter "sudo shutdown -r now" in the terminal window


Restart Now



If you want the system to restart in 1 minute type in sudo shutdown -r 1



Shutdown in one minute


Enter Password


Shutdown in 1 minute



To just just turn off your computer type shutdown -h now

To shut the computer down in 5 minutes type shutdown -h 5

If you want to cancel a shutdown you can use the command shutdown -c


If you enjoyed this post, please share it on your favorite social network by clicking on the “Share / Save” bar below.