Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


Closed Thread
  Search this Thread
Old 12-24-2008, 07:07 PM   #1
LQ Newbie
Registered: Dec 2008
Posts: 18

Rep: Reputation: 0
Smile How to shutdown Linux programmatically

Is there any system call available to shutdown Linux programmatically?For eg:I had used ExitWindows() system call in Visual Basic Program to shutdown Windows programmatically.
Old 12-24-2008, 07:14 PM   #2
Senior Member
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
You can shutdown in many ways.

You will need to see a manual/book on how shutdown happens

#man shutdown

will tell you a little bit

shutdown -ha <time>
Old 12-24-2008, 08:19 PM   #3
LQ Newbie
Registered: Mar 2007
Location: Oklahoma City
Distribution: openSUSE 10.3, 11.0, DSL
Posts: 13

Rep: Reputation: 0

Halt will do the same thing as long as you are logged in as root (it might work with sudo as well)

Closed Thread

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
My Linux box does not shutdown i do when i do /sbin/shutdown -h now yawe_frek Linux - Hardware 6 09-14-2007 07:48 AM
How to press Alt + F1 keys programmatically in Linux dipk_23 Programming 4 05-10-2007 01:01 AM
programmatically adding items to linux start menu cpraveen84 Linux - General 1 08-29-2005 11:23 PM
Linux full shutdown vs. manual shutdown? LQtoto Linux - General 9 01-26-2005 06:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:10 AM.

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