a command to turn off or reboot the system

learn more… | top users | synonyms

32
votes
3answers
8k views

What is the difference between Halt and Shutdown commands?

What is the difference between the halt and shutdown commands?
1
vote
2answers
64 views

An init-script does not get called on shutdown

I have set up an init-script to control the state of a VirtualBox VM: #!/bin/sh #chkconfig: 35 99 5 #description: vTiger virtual machine ### BEGIN INIT INFO # Provides: vtigervm # Required-Start: ...
30
votes
4answers
20k views

What is the difference between reboot , init 6 and shutdown -r now?

I just want to know difference between in reboot init 6 shutdown -r now and which is the safest and the best?
14
votes
1answer
1k views

How to prevent shutdown when an SSH user is logged in?

I'm administrating a networked environment and I had an interesting situation arise yesterday. When a host is required to shutdown by a regular user, it refuses to do so if other users are logged in ...
22
votes
2answers
1k views

How does the power button shut the computer down without root permission?

When I try to shutdown the computer from a command line or terminal I must have root privileges: amy@amy:~$ shutdown now shutdown: Need to be root and amy@amy:~$ halt halt: Need to be root but ...
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
6
votes
1answer
219 views

How do DE's call ACPI functions?

Okay, first off, this is not a problem I am facing, but I would like to understand this better. If I wish to shutdown / reboot my machine from the command line I need to call: $ sudo poweroff $ sudo ...
11
votes
1answer
1k views

What happens when I press “Shut Down” from the GUI?

I have been banging my head against this for quite a while now. It's related to this question. I would like to find out exactly what happens when I choose to shut down my Linux box from the GUI. This ...
8
votes
3answers
4k views

How to run a script with systemd right before shutdown?

What do I need to put in the [install] section, so that systemd runs /home/me/so.pl right before shutdown and also before /proc/self/net/dev gets destroyed? [Unit] Description=Log Traffic [Service] ...
6
votes
3answers
923 views

How to shutdown Linux at a specific datetime from terminal?

It seems I can shutdown using sudo shutdown by specifying a time or minutes. Is there a way to specify datetime for shutdown?
5
votes
2answers
3k views

Halt and poweroff options for shutdown command

I have googled for a while, but I still haven't found a clear answer to the differences between halt and poweroff options for shutdown. So I would like to ask this question here. If it helps, my ...
2
votes
2answers
2k views

xfce: Allow shutdown for non-root users

How do I allow shutdown for normal users in xfce? Currently, the log-out/restart/shutdown box only allows the log-out option, and having to switch to the console, logging in as root and shutting down ...
10
votes
8answers
433 views

How to read the messages during power off

I'm using Lubuntu 11.10. Every time I turn off my Sony Vaio I can read FAIL in red letters. But I can not read. I tried to take a photo, but not success. Well, I was not worrying about this but ...
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, ...
5
votes
2answers
376 views

How can I ensure only the root user have the right to halt/reboot the system?

CentOS Linux by default allows all users to have permission to "halt" & "reboot" the system by using the commands halt and reboot. How can I configure my system so that only the root user has the ...
4
votes
2answers
714 views

Gnome: how to close all applications?

I've configured the Debian system on my netbook to shut down whenever the battery runs too low. Problem is, shutting down kills all running applications without giving them any chance to save any ...
4
votes
1answer
447 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 ...
2
votes
1answer
170 views

Shutting the computer down from Openbox

I've recently installed Openbox,and read a guide that said the PC should be shut down via this command: gdm-control --shutdown && openbox --exit However, it seems a bit counter intuitive. ...