walma
1
Hi,
I would like to shutdown the machine from the command promt, even from the command line interface (Ctrl+Alt+F1). I have tried
shutdown “now”
but this does not shutdown it, just brings it to a halt mode.
How to shutdown and make power off? Thank you.
The command is “poweroff”. If you want to restart then “shutdown -r now”
If you need to be root to shutdown, you can do (if I remember right)
su -C "shutdown -r now" #to reboot
su -C "shutdown -h now" #to shut it down (-h means "halt")
Changing runlevels should do the trick too:
su -c 'init 0'

ah7013
5
and here is command to change runlevel to reboot:
su -c 'init 6'