How to shut down linux machine
Hi guys,
I am new for linux. Can anyone tell me which is command to shutdown Linux machine? Waiting 4 reply, Thanks and Regards, Scorpionking................! |
Hi
Shutdown is the command to shutdown a linux machine.Is this what you were looking or something else. Ajit |
init 0 (zero in numerics)
shutdown -h now You will need to be root for this probably if you are not in graphical mode. But you should have probably got the answer by just googling with correct search. The topics should have been covered in here at LQ as well. |
i think "poweroff" also will help you to shutdown the server
|
Quote:
Instead of changing run level manually, you could do this as well : Code:
shutdown -t0 -h now |
More info is needed. Which distro are you using, Do you have a graphical login?. Do you have root privaleges? If not are you in the sudoers list
if you have a graphical interface there should be a button but without knowing which graphical interface I cant tell where it is. This may ask you for your password if it uses sudo, or root password if not, or maybe no password at all if your on sudoers list use: sudo poweroff or: sudo shutdown -h "now" both of these will prompt for your password. If your sytem dosen't have sudo or you are not on the list. but you have root password use: su -c "poweroff" or: su -c "shutdown -h "now"" both of these will ask for the root password. It is best never to login as root and only switch to root when you have to using su (type exit to leave root), su -c "command" (like su but one shot), sudo (like su -c but allows diffrent users to use different commands, generally considered to be more secure if correctly set up), and finally sudo sh (just like su). also remember man command. It's invaluable as typing man command will give a manual for a commands. man pages do seem alien at first learning to read them is well worth the time |
Or “halt”.
|
"shutdown" is the correct incantation. Don't use "halt."
There should be a nice, civilized, "turn off computer" choice in the taskbar of the GUI... just like in Windows. Shutting down a Linux machine, technically speaking, is done by telling it to switch to a particular runlevel. But "shutdown" (or its GUI equivalent) is the graceful, and intended, way to do that. |
Hell, on many modern distros you could even just press the power button briefly and it'll do the job for you!
|
@All above
I have full access to Linux server. and I just want to shutdown server from command line. So please give me exact command to shutdown. Thanks and Regards, Scorpion king..........! |
We've given you a bunch of ways; what seems to be the problem?
|
Quote:
|
Just don't shut it down. Then see how long it lasts for:)
|
Scorpionkingin:
Quote:"I have full access to Linux server. and I just want to shutdown server from command line. So please give me exact command to shutdown." Answer: If you have full access to the server you can do any of the above instructions and it will shutdown. Or, do you mean you wanted to shutdown down the server remotely? Please ask your question clearly. Hope this helps. |
@ All above,
Thanks......... ~Scorpion King |
All times are GMT -5. The time now is 02:25 AM. |