Tag Info

Hot answers tagged

29

Traditionally the command sudo shutdown now will take you to the runlevel 1 (recovery mode), this will happen for both Upstart and SysV init. To get what you want i.e. to shutdown the computer properly you need to give the -h switch to shutdown. One thing to note here is that halt will close all the processes, turn off the CPUs and return the control to a ...


9

I'm pretty sure the correct command needs to contain the "-h" option (halt). Try this: sudo shutdown -h now


5

It's a legacy from the days when the physical machine couldn't power off by itself. For example, the halt command sudo halt terminates all programs and unloads almost everything from RAM, ready to be powered off. However, if you run sudo halt -p, it will do all that, then signal the system to power off, or in the case of the shutdown command, you need the -a ...


2

Cron will work very well for this. Add the below line (with tweaks) to the end of /etc/crontab: 30 23 * * * root shutdown -h now At 23:30 (11:30 PM), the kiosk will shut down. No matter what user is logged in, the shutdown command runs as root. (If you don't want to use the global crontab, log in as root and use crontab -e. Use the same above syntax ...


2

You want cron, which is the age old unix daemon for running scheduled jobs. Gnome-schedule only runs in your gui session as you, and so won't be able to run commands with sudo since you aren't there to type the password. Insert a file in /etc/cron.d/ to schedule a job to be automatically run as root at specified times. To shutdown at 10:30 pm each ...


2

This could be done using a PolKit policy, if you have admin privileges. Create a .pkla file in /etc/polkit-1/localauthority/50-local.d (say disable-shutdown.pkla), containing: [Disable Shutdown, etc.] Identity=unix-user:* ...


1

A cronjob seems to be the best way because you can specify different times for different days. On Gnome based systems you can just install GNOME Shedule Tasks (http://gnome-schedule.sourceforge.net/) by using sudo apt-get install gnome-schedule and then configure the cronjobs using the GUI otherwise you would have to use sudo crontab -e and then add the ...


1

The correct command would be sudo shutdown -h 23:45 - without the -h or -r switch it isn't a valid command (there are others - see man page). Using +9 instead of the time gives you any easy way to say 'in 9 minutes'. Any reference to E:/ tells us that there is some reference to a windows command going on here as linux has no E:/ which is partly why there ...


1

You can find a solution here: Suspend/resume all Vagrant boxes on system shutdown/startup. There is a simple init script that suspends all running boxes before shutting down. Installation Edit /etc/init.d/vagrant-boxes and paste the script from above article and save. Or download it from here and save it to /etc/init.d/vagrant-boxes. On debian/ubuntu etc, ...



Only top voted, non community-wiki answers of a minimum length are eligible