Q. I've just installed Ubuntu Linux on my computer. I'd like to know - how to shutdown Ubuntu box over ssh session?
A. If you are not using GUI, you can run halt or shutdown command to powerdown box.
shutdown command
shutdown arranges for the system to be brought down in a safe way. 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.
How do I use shutdown command?
The shutdown command can be used to turn off or reboot a computer. Type the command as follows to shutdown server / computer immediately:
$ sudo shutdown -h now
OR
$ sudo shutdown -h 0
How do I shutdown compute at specific time?
To shutdown computer at 6:45pm, enter:
$ sudo shutdown -h 18:45 "Server is going down for maintenance"
At 6:30pm message will go out to all user and 6:45 system will shutdown.
Please note that you can also use halt or poweroff or reboot command for stopping and restarting the system:
$ sudo halt
OR
$ sudo poweroff
How do I reboot computer?
Simply use reboot command:
$ sudo reboot
OR
$ sudo shutdown -r 0
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- My 10 UNIX Command Line Mistakes
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
- Email FAQ to a friend
- Download PDF version
- Printable version
- Comment RSS feed
- Last Updated: 10/9/07



{ 12 comments… read them below or add one }
Hi, the give commads is working properly.
yes…is working properly, BUT…in my case i saw something weird…i’ve used the command $ sudo shutdown -h XX:YY only for test…the actually countdown time was…1minute…after that the PC has automaticly shutdown… OK…but when i’ve started up the PC…the respons was: “biiiiiiiiiiiiiiiiiiiiiiiiiiiip biiiiip biiiip” and nothing else…it’s a normal reaction? or it’s something wrong with my PC?…eventually i solved the problem…i’ve restarted the power supply and then…voila :D
Hi, I tried after reading this “shutdown” without “sudo”, to check out the command. Then I got the error “-bash: shutdown: command not found”. That confused me, because normaly you can check out the command, but not execute it without “root-authority”
So don’t forget to add “sudo” =)
sudo init 0 will be working fine thanks
thanx for your help =]
Thanks for this site.
thx
and to cancel the shutdown use
sudo shutdown -c
Is there any way to make the computer shutdown at a later DATE rather than just a later time? I’m asking because my electricity company says they’ll proceed to work in my area and the “juice” will be cut this coming Monday and this coming Saturday…
is there a way to shutdown other computers using my computer in terminal?help!!!!!
sombody helpme
how to remotly shutdown ubuntu computer
how change theubuntu command to simply button in java
i want to sare folder in ubuntu 9.10 server now i can connect to ubuntu but i can not share file and folfer
help me please