Shutdown and Restart Your Computer From The Ubuntu Terminal

Shutdown Ubuntu from Terminal

How to reboot, shutdown, log off PC from Terminal by command-line in Ubuntu and Linux Mint
Linux was all command-line when it began. Tuesday, September 18, Please save your work. First open your terminal and then type: Related but not a duplicate: Now, instead of shuting it down and halting it, you will restart your computer once it's shutdown.

Hate passwords (sudo) and love one-liners?

How To Install Notepad++ In Ubuntu Using Terminal

Using this command basically gives your computer the option to either halt or poweroff, then does that immediately. Halting simply stops all running processes, making it safe to turn off your computer, while the poweroff command does both.

If you would like to ensure that your system halts or poweroffs by default, the following commands do just that. In either instance, the time at the end is necessary. Typing either sudo shutdown -P or sudo shutdown -H without the time will bring up a message informing you that the time is necessary. What if you want a bit more control? You can add custom alias using gedit command.

What you did is assigned a new alias logout which Ubuntu reads as gnome-session-quit and initiates logout command. Now you need to just enter logout command to log off PC. Instead it ticks a timer and gives you one minute time to save all things. If you need immediate shutdown, use this command.

Make sure to save all documents before running this command. All logged-in users are notified that the system is going down and, within the last five minutes of TIME, new logins are prevented. The shutdown utility provides an automated shutdown procedure for supersers to nicely notify users when the system is shutting down, saving them from system administrators, hackers, and gurus, who would otherwise not bother with such niceties. The shutdown command can be used to turn off or reboot a computer.

To shutdown computer at 6: Please note that you can also use halt or poweroff or reboot command for stopping and restarting the system: Simply use reboot command: Is there any way to make the computer shutdown at a later DATE rather than just a later time? Broadcast message from adminuser domain. But then nothing happens. Might there be a process stopping the shutdown? The command shutdown -P 0 does not eject my cd-tray with the backtrack4 DVD.

For Ubuntu 14.10 or earlier: