LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2004, 06:12 PM   #1
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Rep: Reputation: 35
Shuting computer down in bash shell


Is there a bash command that shuts the computer down? like the command reboot for rebooting the system?
 
Old 01-06-2004, 06:19 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
Take your pick. See man pages:
shutdown
halt
poweroff
 
Old 01-06-2004, 11:53 PM   #3
Vincent_Vega
Member
 
Registered: Nov 2003
Location: Jacksonville, FL
Distribution: Slackware & Arch
Posts: 825

Rep: Reputation: 31
shutdown -h now
 
Old 12-03-2005, 12:38 PM   #4
janko_big_boy
LQ Newbie
 
Registered: Feb 2005
Location: Arabia
Distribution: Slackware 10.2
Posts: 5

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

 
Old 12-03-2005, 01:22 PM   #5
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
changing computer name in shell hamster001 Linux - Newbie 8 10-29-2003 06:12 PM
bash shell dawood shaheen Programming 9 08-01-2003 06:07 AM
Bash Shell triplem Linux - Software 4 04-17-2003 06:11 PM
Unabled to use the computer after shuting down the screen... mo Linux - Newbie 2 06-13-2001 03:00 AM
Help!!!!! Bash Shell???? DarkHorse Linux - Newbie 7 06-04-2001 01:13 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration