a command to turn off or reboot the system

learn more… | top users | synonyms

0
votes
1answer
44 views

My mp3player freezes when I eject it

When I eject(or safely remove) or unplug my mp3player from the USB, the screen freezes and an "ok to disconnect" message remains on its screen. Then I have to reset my mp3player. However when I ...
1
vote
1answer
142 views

How to postpone shutdown with systemd?

I run a desktop computer, which typically is shut down for the nights and often also during the day, when not in use or left unattended. I usually shut it down from GUI (KDE 4.10), sometimes - from ...
32
votes
4answers
1k views

Why can't I execute shutdown when the permission is rwxr-xr-x?

I'm in /sbin and I see that shutdown has permissions rwxr-xr-x. Doesn't this mean that anyone can execute it?
4
votes
2answers
358 views

Changing shutdown broadcast message

Is it possible to change the default message broadcasted by shutdown to something else?
1
vote
1answer
1k views

Why does halt not turn the machine off? [duplicate]

shutdown now kills everything and then powers down the machine. halt kills everything and then... there is no step 2. It will sit, running but not doing anything, until people stop arguing over ...
1
vote
1answer
96 views

How do I power down on reboot?

I am programming for a Linux ARM device and have some situations where I need to reboot the device after a user prompt. Whenever I run reboot -f or shutdown -r now though, the system starts up with a ...
1
vote
2answers
1k views

run a script at shutdown in Debain

I am using Debain wheezy. My problem is , I am using a limited 2.5 GB net connection. My idea is simply running a script as #!/bin/bash date >> ~/mydatausage.txt ifconfig -a >> ...
0
votes
1answer
195 views

Hook shutdown script to shutting down sequnce

Is it possible to hook some script to shutting down sequence for Linux? To give you a bit more context processes of nodes of the cluster are started as processes from cluster -master. They are not ...
1
vote
1answer
3k views

Configure power button to shutdown on Debian

I use Debian and I want my power button to shutdown the PC. Currently it sleeps, when I press it. Is there any command for it to make it shutdown?
2
votes
2answers
481 views

shutdown ubuntu server after 2 days at midnight

without using a cronjob how would I have a ubuntu server shutdown after 2 days (2880 minutes) at midnight? The essence of what I want to do is this: bash shutdown -r +2880 00:00 which would tell ...
9
votes
1answer
319 views

Don't let users reboot while root's logged in

On my system users can reboot and shut down the system. From time to time I need to update software (or do anything else) and I don't want users to reboot/shutdown the system until I've finished. Is ...
0
votes
1answer
122 views

Recover from ext2 filesystem corruption

I have a TinyCore (3.6) Linux distribution on a device of mine, which uses disk-on-module or compact flash storage. The filesystem is ext2. I have a LAMP stack on this device and I'm playing with a ...
2
votes
1answer
66 views

How do I identify on my system after successful boot. weather it was crash or was it a shutdown or reboot or something else?

Depending on the restart of the system, I need to make my application taking some follow up. my system is get restarted as following: my self as system admin rebooting sudo init 6 or sudo reboot my ...
2
votes
1answer
330 views

How to shut down Linux if idle for 30+ minutes?

We define "idle" based on how screen savers in Linux define it. I found this tool called "xautolock". I tested it like this: /usr/X11R6/bin/xautolock -time 1 -locker "notify-send test" I placed ...
3
votes
1answer
1k views

What's the right way to shutdown Arch Linux through dbus interface?

I'm running openbox with Arch Linux, and looks like the old console kit interface has been long gone, %> dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit ...
1
vote
1answer
386 views

Can't Log into Fedora 19 after force shutdown

I was exploring my new fedora 19 after a crash in KDE (I don't know what I just did). I couldn't shutdown my laptop either with the graphical method or the terminal way (because the terminal refused ...
2
votes
1answer
459 views

Why won't this shutdown script work when executed by ACPID?

Based on this thread I modified my /etc/acpi/powerbtn.sh script to account for LXDE sessions: # getXuser gets the X user belonging to the display in $displaynum. # If you want the foreground X user, ...
1
vote
0answers
428 views

PC sudden shutdown, Sensors show normal temps, Thermal event interrupts shows 1276

I'm experiencing sudden shutdowns on my Linux systems. Using Ubuntu 12.04, my kernel version is 3.5.0-37-generic #58~precise1-Ubuntu. Running a Acer M5 581t(G) with 6 gigs ram laptop. I have been ...
1
vote
3answers
106 views

Is there any way to disable shutdowning remote machine?

I sometimes mistakenly shutdown the remote machine by using sudo init 0, so I wrote something like in one of my rc files: alias sudo='sudo ' if [ $SSH_CLIENT ]; then alias init 'echo Never use init ...
3
votes
1answer
1k views

Poweroff or Reboot as normal User

To run the command poweroff or reboot one needs to be super user. Is there anyway I can run this as a normal user? I just don't want to sudo and enter my password every time I reboot or power off.
0
votes
1answer
1k views

My laptop shuts down every time I unplug it

I am using a Lenovo G580 with Linux Mint 14 updated. My laptop shuts off every time I unplug it as if there is no battery even when I am using the BIOS. But, It detects the battery as "84% charging" ...
1
vote
0answers
254 views

I get this shutdown prompt, then my laptop dies. What is happening?

I get a dialog box that says 'Shut down the system now', the same as if I had clicked 'quit' in the main menu. This happens seemingly randomly. If I choose 'cancel', it sometimes goes away. Other ...
3
votes
1answer
204 views

Rolling your own init: How to shutdown/restart?

After reading this answer, I thought it would be funny to roll my own init on Python, so I wrote this in /init-python. #!/usr/bin/python3 import os import subprocess # Make / writable! ...
1
vote
2answers
840 views

Warn users that the system is going down for a reboot

I'm new to linux server administration, and I wonder how you would warn users that the system is going down for a restart. According to LPIC1 Training here: ...
5
votes
2answers
788 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 ...
3
votes
3answers
313 views

To recover my system so it shut down normally?

I have Linux mint 13(ubuntu 12.04) installed on my thinkpad T520, running for around 1 year. I'm not able to shut down my machine even if I do: sudo shutdown now. At first, it halts after messages of ...
1
vote
0answers
527 views

Why does my server not shutdown properly?

When I run $ reboot on my embedded FreeNAS 0.7 (FreeBSD 7.2) it does start the shut down procedure but seemingly hangs. I have registered a command to start a service script which is executed on ...
2
votes
2answers
689 views

How to disable wlan0 when shutdown

Since a long time ago my Sony Vaio with Lubuntu 11.10 is showing a red FAIL message during the shutdown process. It tries to kill some process and the white messages on the screen frozen for some ...
12
votes
1answer
2k 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 ...
1
vote
1answer
1k views

Xfce: Upgrade from Squeeze to Wheezy broke xfce's user policies

While using Debian squeeze, I was able to allow a user shutdown in xfce by adding users to the powerdev group (see here: xfce: Allow shutdown for non-root users). Now, I upgraded my system to Debian ...
5
votes
1answer
247 views

Automatic shutdown after startup

I'm a new newbie Linux Mint user but I have a lot of desire to learn. I played a little with the shutdown command typing: sudo shutdown +20 and then: sudo shutdown -c I then manually hibernate ...
2
votes
0answers
334 views

Fedora 18 doesn't shutdown , restart or sleep / can not unmount all file systems

When I do something (whatever) that results in a shut down, restart or sleep (for example usual shut down or restart, closing the lid, etc.), fedora 18 (x86_64 , GNOME desktop) comes up with an error ...
3
votes
1answer
227 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. ...
1
vote
2answers
2k views

How to simulate unplugged network cable or down server?

I have simulated network latency with netem and It's great. Now I want to simulate unplugged network cable or when server goes down. I need this to make testing of my application easier and I couldn't ...
2
votes
1answer
158 views

Diagnose unplanned shutdowns

I have a problem with a server that is shutting down for some unknown reason. I check the logs each time it happens and cannot find anything of particular interest which would suggest why its going ...
16
votes
3answers
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 ...
35
votes
4answers
43k 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?
3
votes
1answer
301 views

Why was -F removed from /sbin/shutdown?

I used to be able to run /sbin/shutdown -r -F now but in recent Ubuntu and Fedora releases there is no -F option and if I want to force an fsck I need to do touch /forcefsck; /sbin/shutdown -r now. ...
2
votes
1answer
116 views

How can I setup a system immune to abrupt poweroffs?

I have a system that boots from a solid state disk. How can I make it immune to improper shutdowns? I can also switch to a distribution having this feature. I can choose between Ubuntu, Redhat, and ...
2
votes
3answers
704 views

Ensure that loopback root and host are unmounted on shutdown

I'm trying to setup a Linux system that runs from an LVM-formatted image file. After some tinkering with the initramfs and boot options I managed to make it up and running by mounting the host file ...
7
votes
1answer
810 views

What's the right way to execute a script before system shutdown (systemd)?

I wrote a script that suspends all my VirtualBox machines, and put a line in /etc/rc.local.shutdown, but it doesn't seem to work, su - XX -c /XX When I'm booting the next time, VirtualBox tells me ...
3
votes
2answers
956 views

Is running “sudo sync” and removing power dangerous for my system?

I run an Ubuntu system, and it sometimes takes a while to shut down. Apparently, GNU/Linux attempts to, in a nutshell, stop all running processes, flush the filesystem journal, and then cut off the ...
3
votes
2answers
4k 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 ...
2
votes
1answer
200 views

write pc uptime in a file in shutdown

I need to log PC uptime. How I can do this? I use uptime for this and I will when ubuntu is shutdown write this command output in a file.
3
votes
1answer
393 views

Have Sun keyboard moon key (116) not shut down my computer

On my Sun keyboard, the top-rightmost key (with a moon image, right above the keypad) shuts down my computer. I'd like it not to, as I hit it by mistake now and then. In /etc/default/keyboard, I only ...
11
votes
3answers
741 views

Eject CD on shutdown

OK, so I have a simple problem: I have a live CD, and I want the CD to eject when the computer is rebooted or halted. Executing /usr/bin/eject -m makes the CD eject just fine... trouble is, as you ...
10
votes
8answers
809 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 ...
5
votes
1answer
795 views

Using a APC Smart-UPS to shutdown a Ubuntu Server Cluster

I'm currently in the process of designing a solution to shutdown a two Ubuntu Server cluster that uses heartbeat and DRBD to replicate storage and offer a NFS share to some IP cameras. We want to ...
16
votes
2answers
12k views

Execute a command before shutdown

I want to execute a simple command just before the computer shuts down (timing is not essential). For startup I can use /etc/rc.local - is there something similar for shutdown? Note that I would ...
1
vote
2answers
734 views

My computer won't shut off normally

Every time I try to shut down my iMac it just stays on that loading circle forever. The only way I can get it to shut down is by holding down the power button. I checked the system logs (below) and I ...