LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shuting computer down in bash shell (https://www.linuxquestions.org/questions/linux-newbie-8/shuting-computer-down-in-bash-shell-132177/)

zWaR 01-06-2004 05:12 PM

Shuting computer down in bash shell
 
Is there a bash command that shuts the computer down? like the command reboot for rebooting the system?

michaelk 01-06-2004 05:19 PM

Take your pick. See man pages:
shutdown
halt
poweroff

Vincent_Vega 01-06-2004 10:53 PM

shutdown -h now

janko_big_boy 12-03-2005 11:38 AM

zdravo zWaR oz Uroš jan tu :)). You can try also as super user this command /sbin/init 0

:)

ethics 12-03-2005 12:22 PM

You generally need to be root to execute the shutdown command, unless you change it's permissions/setup sudo.

the path is /sbin/shutdown

so as root /sbin/shutdown -r now - reboots
/sbin/shutdown -h now - shutsdown

or use sudo, the now switch can also be changed to give a timed reboot etc.


All times are GMT -5. The time now is 04:46 PM.