When I attempt to shutdown with the gear icon, the login screen always comes back. When I Ctrl+Alt+F1 into a PTY, logon and run shutdown 0, it goes into single-user mode but remains there. Subsequent attempts produce the same result.

I grepped /var/log/* (as root) for "shutdown" but found nothing. man shutdown only mentions that it writes a record to /var/log/wtmp and utmp which are binary files, and which doesn't sound like it will help me much in this case since the docs indicates they appear to be about tracking logins and logouts, not attempts to shut down the system.

I can't write down all the messages that it dumps on the screen. How else can I debug this? Doesn't shutdown leave a trace somewhere?

  • 1
    I'm not sure what the default action/runlevel is for shutdown. Could you try shutdown -h 0 ? – Nanne Jul 2 '13 at 15:07
  • 4
    I should check the Ubuntu defaults, but normally shutdown means 'shutdown to single use mode`. If you want to reboot, halt or power off you will need to specify that. (e.g. shutdown -r now). – Hennes Jul 2 '13 at 15:20

The command that I always have used to shutdown a Ubuntu machine is:

sudo halt

I hope this helps you.

| improve this answer | |

"Shutdown" should be understood from a system perspective (all users out, no more service running), not from a machine perspective (power-off).

From man shutdown:

If no option is specified, the default action is to bring the system down into single-user mode.

If you want to actually power off the machine:

-H Requests that the system be halted after it has been brought down.

Warning: it is often believed that -h means power off, but actually :

-h Requests that the system be either halted or powered off after it has been brought down, with the choice as to which left up to the system.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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