How to Shut Down and Restart Ubuntu 8.10 Intrepid Ibex from the Command Line

By Jonathan Moeller - Last updated: Tuesday, January 6, 2009 - Save & Share - One Comment

It’s possible to shut down and restart Ubuntu 8.10 Intrepid Ibex from the command line. This is useful if you’re working in a server environment without X11, or if you’re connected remotely to a system via SSH, or while creating shell scripts.

Note that these commands will IMMEDIATELY shut down or restart your system, and not bother with little niceties such as pausing to save your work or letting other users log gracefully out of the system. So before using those commands, make sure your work is saved, and make sure that no other users on the system need work saved, otherwise you’ll quickly become unpopular.

To restart your Ubuntu system, use this command:

sudo init 6

Your Ubuntu system will immediately restart.

To shut down your Ubuntu system, use this command:

sudo init 0

This will shut down your Ubuntu system.

-JM

Posted in Linux • • Top Of Page

One Response to “How to Shut Down and Restart Ubuntu 8.10 Intrepid Ibex from the Command Line”

Comment from Alex J. Avriette
Time January 8, 2009 at 2:38 am

See also:

shutdown -g 0
sync && halt
reboot

Very helpful to have trusted keys from your laptop or whichever so you can say ssh sluggishbox ’sudo shutdown -g 0′

This is incidentally why I have NOPASSWD: ALL for my own personal group (I differentiate between “staff” (regular users with rights) and “wheel” (users who can be trusted with passwordless sudo.

Don’t get too attached to init runlevels. They very drastically per distribution.

Write a comment