a command to turn off or reboot the system

learn more… | top users | synonyms

4
votes
2answers
2k views

Can I allow a non-root user to log in when /etc/nologin exists?

Suppose a non-root user with sudo privileges executes a delayed shutdown (shutdown +10 or whatever) and logs out. Then, before the shutdown occurs, he wants to log back in and cancel the shutdown. The ...
5
votes
3answers
1k views

The package containing shutdown command

Which Debian or Ubuntu package has the /sbin/shutdown command in it? I want to read the source of that command (and possibly modify it to report notification on desktop) and I didn't know which ...
5
votes
1answer
607 views

Is there a way to control the delay before shutdown on low battery?

Is there any way to configure shutdown on critically low battery to give me a bit of time before actually shutting down? I've set GNOME Power Manager to shutdown on low battery (hibernating does not ...
5
votes
1answer
835 views

How to find out what turned off the computer?

Yesterday, after getting back home I found out my computer is turned off. Since it appeared it was cold shutdown (a lot of disk repairs were shown during boot up) I am wondering what was the cause. ...
2
votes
0answers
123 views

How can I prevent Control+Alt+D from logging me out (of Gnome 2.22 on Debian 5)?

I was using Emacs, and typed Control+Alt+D in order to run Emacs' "down-list" command. I was dismayed to see, however, that I was instantly logged out; I assume this is some Gnome keyboard shortcut. ...
7
votes
3answers
1k views

How can I set that only root + a given user can shut down my pc?

If I'm using Ubuntu 11.04, how can I configure it such that that only two users can shut down/suspend/hibernate my PC: the root user and one regular user?
12
votes
3answers
554 views

Why do we need the reboot function in different binaries?

Why do we need the reboot function in different binaries? shutdown -r and reboot Or do they differ in something?
4
votes
1answer
446 views

Does `shutdown -P now` safely unmount a USB drive mounted to `/dev/sdb1`?

I typically unmount my USB drive (using umount) from /dev/sdb1 before I shutdown my computer but if I shut it down using shutdown -P now and then restart it, the drive is no longer mounted. Is this ...
0
votes
1answer
89 views

Shutdown screen taking too long to pop up in Ubuntu 8.04

I am using Ubuntu 8.04, and it was working fine until a few days ago, the pop screen for ShutDown started taking too long to come(about 3 mins) and in the mean time computer freezes. However, after ...
4
votes
3answers
420 views

Do I need to halt in order to really turn power off?

I tried shutdown -f now, thinking it will do a full power off sequence. Instead, it ends with *Checking battery state... and just hangs there. Should I add -h switch to fully take power off, ...
17
votes
6answers
28k views

How to find out from the logs what caused system shutdown?

E.g. I'm seeing this in /var/log/messages: Mar 01 23:12:34 hostname shutdown: shutting down for system halt Is there a way to find out what caused the shutdown? E.g. was it run from console, or ...
32
votes
3answers
8k views

What is the difference between Halt and Shutdown commands?

What is the difference between the halt and shutdown commands?
3
votes
1answer
253 views

Can't shutdown mandriva 2010.2

I can't seem to shutdown my machine from mandriva,I have to restart to shut it down from GRUB it says "System Halted" and just freezes there I'm using the x86_64 GNOME version I've already asked on ...
11
votes
2answers
4k views

Is it possible to stop a shutdown command?

Assuming you've just entered the command shutdown -h now (or something equivalent), is there realistically anything you can do (if you're quick enough) to prevent the machine shutting down?
-1
votes
1answer
275 views

Is 'Shut down computer when finished' during Avidemux encoding stage useful?

I get the option to Shut down computer when finished during encoding stage of Avidemux. Why would I want to do that?
8
votes
5answers
2k views

How to shut down the computer after a task has been completed?

I usually start a download before I go to school. Which command should I use to automatically make the necessary saves and turn off the computer after a particular task has been completed? (Say, ...
5
votes
1answer
807 views

How to get a persistent “history”-file even after a non-clean shutdown?

I am trying Ubuntu Server 10.10 in VirtualBox. I like that the commands I run is saved in a "history"-file that can be shown with the history command. But if I just turn off VirtualBox without the ...
10
votes
5answers
8k views

Stop program running at startup in Linux

How do I stop a program running at startup in Linux. I want to remove some apps from startup to allow them to be managed by supervisord e.g apache2
8
votes
5answers
2k views

On Linux, is there an rc.local equivalent for shutdown?

I've got a few commands that I run in rc.local so they are run last in the startup sequence. I would like to know if there is a similar facility for undoing the results of those commands at shutdown, ...