Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever i use a command like

shutdown -s -f -t 00

I can see that the shutdown occurs faster than when I go and click the shutdown button in the Windows GUI.

This scenario can be compared with my other OS, i.e. Ubuntu as well. In ubuntu terminal, if I enter the following command for shutdown, the process occurs quite faster and never failed to my knowledge. But if I use the shutdown button in the GUI, the system sometimes hangs and its process takes longer to execute.

sudo init 0

I can sense that the terminals and the command prompt works directly on the kernel. But I am curious to know whether there are any other technical stuff going on behind this.

share|improve this question

migrated from Feb 27 '12 at 3:31

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

Firstly, the commands you're using aren't the same commands that are used when you press the GUI button, so there's some speed in using those commands alone.

Secondly, the GUI has GUI-specific prompts/effects/etc that it must run through before it can get to the command. This will also add time to the overall effect of clicking the button in the GUI.

This isn't a bad question, it's not as cut and dry as say command copy vs GUI copy, but I think the main performance gain is in the actual commands that you're using (e.g. limited wait time, forcing close). The GUI will have a default wait time and will prompt for force close, the prompting falls into category 2 while the forcing falls into category 1.

share|improve this answer
nice answer..... – Arun Feb 28 '12 at 8:25

On Windows, when you use the GUI shutdown, the system waits for closing all running programs, up to 20 seconds. Maybe when you use the command, Windows doesn't wait for it. (Perhaps the same on Linux?)

share|improve this answer
Even When i run the command, the running programs are closed and only then it proceeds with the shutdown process... So, if you have any answer can you please elaborate in technical means... – Arun Feb 26 '12 at 16:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.