a command to turn off or reboot the system

learn more… | top users | synonyms

3
votes
1answer
656 views

How do I run a script just before halt using LSB headers on Raspbian

I'm building a shutdown button for my Raspberry pi, and for that I have a python script that needs to change a GPIO pin on my Raspberry Pi just before the system runs the halt script. Now Raspbian ...
-1
votes
1answer
31 views

Shutdown command fails

Running lxc on my Debian 8 system. Container stopped responding to ssh. lxc-console and lxc-stop were both unresponsive. /etc/init.d/lxc stop was unresponsive. Fine, time to reboot. shutdown -r ...
3
votes
1answer
2k views

Find last shutdown time

This is the command I am using: last -x|grep shutdown | head -1 but it's giving me the duration with +2 hours: shutdown system down 3.14-1-amd64 Mon Jul 21 08:43 - 22:19 (13:36) the last ...
0
votes
0answers
7 views

Change Alt + F4 behavior in Elementary OS [migrated]

I am afraid this would be hard to achieve however I'll try to ask. I was used from other OSes like Win or other distros that when you have multiple applications opened and you want to know shutdown ...
3
votes
1answer
92 views

linux systemd intercept shutdown if service is active

I've created a little update/upgrade program for my arch-based linux. Instead of using a cronjob I'm using systemd and created following files: in /etc/systemd/system: uupgrades.target & ...
4
votes
1answer
58 views

After sending shutdown command, ssh session doesn't terminate

Whenever I send the command to turn off or restart my Debian servers, my shell is left hanging and unresponsive (can't type any commands). Performing the same action in Ubuntu results in the ...
3
votes
3answers
2k views

RHEL6 Can't make my script run on shutdown and reboot

I'm trying to execute a script in each shutdown and reboot but the script never runs. I created the script baseRhel64 and save it to /etc/rc.d/init.d I did chkconfig --add baseRhel64 I included in ...
2
votes
3answers
2k views

Debian Wheezy rebooting instead of powering off

I'm having a weird issue with my Debian Wheezy desktop. When I try to shutdown the system (either from Gnome or from the command line with shutdown -h now) the computer automatically reboots. The ...
1
vote
0answers
24 views

Graceful shutdown with option to save files or cancel

How do I shutdown a desktop session gracefully from the command line without root, giving programs the option to ask the user to save files or cancel the shutdown? I know shutdown, halt, and other ...
7
votes
1answer
1k views

Using systemd to execute a script before system shutdown?

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 ...
0
votes
2answers
1k views

Bring up shutdown menu of Cinnamon via command line

How can I bring up the shutdown menu of Cinnamon via command line? Note: I don't want the user menu. This menu for switching or logging out a user is brought up via Ctrl+Alt+Del.
2
votes
1answer
65 views

Critical temperature reached - don't shut down

In my syslog I had: thermal thermal_zone0: critical temperature reached(102 C),shutting down I lost data due to this. I would much rather that the system: suspended to RAM, or lowered the clock ...
11
votes
3answers
10k 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] ...
0
votes
0answers
133 views

Ubuntu 15.04 Shutdown problem

When I Shutdown my Ubuntu 15.04 , sometimes instead of shutting down it keeps on showing animation of shutting down. I have installed gnome on my system.
1
vote
1answer
30 views

running command before shtudown doesn't seem to work

I've created an ubuntu server kiosk based on some guide that I've found and I'm trying to stop the kiosk before the shutdown. The kiosk is being started automatically or manually with the command sudo ...
2
votes
1answer
39 views

How to schedule shutdown every day?

We have a server that is used for Linux thin clients in a class. The server is started when required and I want to schedule it to power off at 22:00 every day to avoid power wasting. I thought of ...
14
votes
5answers
18k 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
0
votes
1answer
50 views

How do i force shut down on a computer without on off button

I have a chromebook, I just installed Uberstudent(based on ubuntu 14.04) on it and when I tried to reboot it after installing, it doesn't shut down. It just says SQUASHFS error: Unable to read ...
32
votes
7answers
73k 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 ...
1
vote
2answers
28 views

Gentoo portage continue after shutdown

Can I rerun my command to install KDE full after a shutdown and will it continue? I'm installing KDE and it takes a while now. I'm on my laptop and it's pretty late here. There are many packages to ...
-8
votes
2answers
81 views

open ssh server back [closed]

After I type # shutdown -h now from terminal, I can't access to the ssh remote server. (ssh root@10.101.6.240) How should I open back the ssh server?
1
vote
4answers
3k views

Is there a shutdown/restart command for x11VNC? - Linux (Debian)

I am running Linux (Debian). I recently installed the x11VNC server on my computer. I found the command to start the server is: x11vnc -display :0 I have been searching but did not find any ...
1
vote
2answers
258 views

KDE: Leave --> Turn Off Computer not shutting down system

I recently decided to install Debian 8 with the KDE desktop environment. A problem I have been having is shutting down the computer. The computer always restarts even when I tell it to shut down. I ...
44
votes
4answers
29k views

What is the difference between Halt and Shutdown commands?

What is the difference between the halt and shutdown commands?
23
votes
3answers
3k views

What is the difference between these commands for bringing down a Linux server?

Reading "What is the difference between Halt and Shutdown commands?" , I generally have an idea what does the command shutdown does, with or without -h/-r options. The "halt" command performs ...
44
votes
4answers
78k 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?
1
vote
0answers
155 views

Linux Mint 17.1 shutdown option doesn't work

Sometimes when I use the shutdown option in cinnamon the system closes some of the running programs and then just sits on the desktop until I tell it to shutdown again. The shutdown and poweroff ...
5
votes
1answer
247 views

what does mount -o remount,ro / actually do (under the hood)

To remount a mounted filesystem to read-only, I can use following command: mount -o remount,ro /foo This is used for example in the shutdown sequence, where root filesystem (/) is remounted ...
1
vote
1answer
63 views

How to setup boot scripts to save orphan inodes after improper shutdown?

after abnormal shutdown in dmesg I have [ 16.107445] EXT4-fs (dm-1): INFO: recovery required on readonly filesystem [ 16.107450] EXT4-fs (dm-1): write access will be enabled during recovery [ ...
3
votes
3answers
247 views

How do you prevent a DHCP release during shutdown?

I am currently using Ubuntu 14.04, but expect this to be applicable for different distros. I would like to prevent a DHCP release during shutdown, and opt for either the lease to expire or for a DHCP ...
0
votes
1answer
87 views

How to shutdown Linux parted magic from terminal?

Once in a while I have to use parted magic to restore superblocks. I tried to execute in the terminal: shutdown -h now telinit 0 Both did not work, what else might be possible to shutdown Linux via ...
0
votes
0answers
200 views

Suspend option disappear from shutdown dialog on Mint 17.1 Cinnamon

Previously I have a "Suspend" option when I open shutdown dialog, not sure why (probably because I did a apt-get upgrade I found the "suspend" option has gone: Another thing is even I set my power ...
3
votes
1answer
71 views

How to poweroff headless machine using a script

I have a Java application that starts automatically when the headless machine (Ubuntu 14.04 Server) boots and runs as a user. When the application is finished I need it to execute a script to ...
4
votes
1answer
67 views

How to protect against purge of bash history?

Following the answer: When closing multiple bash instances at the same time, there is a known race condition that may cause the history to be cleared. This occurs because there is no locking ...
0
votes
0answers
68 views

Why doesn't Linux shutdown cleanly?

I'm running Linux Mint with LXDE on Dell Inspiron 1501. Whenever I issue poweroff command, or reboot or shutdown the computer via the graphical menus, it doesn't seem like a clean shutdown. In ...
0
votes
2answers
99 views

How to escape from command line interface in fedora21?

I was stuck in command line interface of Linux Fedora 21. I don't know how to get to the GNOME. I forced my laptop to shutdown by hitting the power button several times. Now I really want to know how ...
1
vote
0answers
96 views

Debian wheezy - hanging on shutdown

My debian system hangs when I'm trying to shutdown/reboot. It hangs on: kvm: exiting hardware virtualization (infinitely blinking white cursor) I've tried to shutdown by gui and by ...
1
vote
1answer
136 views

How to turn off scroll lock LED, indicating keyboard layout, when the PC is turned off

I edited the file /etc/X11/xorg.conf.d/90-keyboard-layout.conf: Section "InputClass" Identifier "keyboard-all" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" ...
1
vote
2answers
990 views

Arch Linux slow shutdown

I'm suffering from a very slow shutdown/reboot with Arch Linux, so I followed the instructions given here to enable logging. So here is the log generated during (slow) reboot that unfortunatelly I ...
1
vote
0answers
318 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 ...
2
votes
1answer
406 views

How to reboot/shut down gracefully in Awesome WM?

My current configuration uses kdesu shutdown -[rh] now to reboot/shut down. The entire shutdown procedure takes about 1-2 seconds. But after every boot Firefox says it was shut down prematurely, ...
0
votes
0answers
136 views

Acer Aspire v5 571 Power off reboots Arch linux

Everytime I try to power off my arch linux it will turn off and reboot. I assume the reasoning why it does this is because the usb ports don't turn off and it somehow turns it back on. I was trying ...
3
votes
1answer
177 views

Output shutdown messages to multiple consoles

I have configured my system to direct console output on boot to serial and vga using kernel parameters. Serial is the last argument in the kernel parameters and will be the default used for ...
2
votes
1answer
106 views

Why doesn't `shutdown now` (with no other arguments) run init scripts?

I'm running Rasbpian on my Pi, and I have a script in /etc/rc0.d (or more precisely, a symlink to /etc/init.d/myscript.sh) that does some GPIO output to notify the user that power can be shut off. If ...
1
vote
1answer
99 views

Is there any command in linux which will force linux machine to not shut-down

I have a very important process which is having a Queue, In Queue i'm storing important data and when if someone trap that process it must have to process the data which is there in the Queue after ...
5
votes
1answer
206 views

Configure power button to shutdown on Debian/Mac Mini G4

I use Debian/PPC on an old Mac Mini G4, it currently serve as a DLNA server (UPnP), no mouse or keyboard plugged. I would like that my power button also serves to shutdown the box. Currently it does ...
1
vote
1answer
146 views

SSD dedicated to swap-only fails on Debian or Ubuntu

It did not happen to me yet, but if I dedicate a single SSD (non-RAID) to swap-ONLY and the server system is using it to full capacity - what happens next? How am I to recover, assuming I have an ...
2
votes
0answers
148 views

Server shutdown suddenly [closed]

One of our production server shutdown suddenly for unknown reason. I've checked the logs and found this: init: tty (/dev/tty5) main process (2399) killed by TERM signal Dec 7 12:02:32 rh ...
4
votes
1answer
111 views

How to get system to shutdown when Xorg is quit?

I installed nodm, so that Debian starts Xorg and a window manager immediately after booting, without requesting any password and without a login. How can I similarly setup Debian to shutdown the ...
4
votes
1answer
310 views

Execute code on shutdown on Fedora 19

I need to catch any OS shut down and execute some actions before letting the OS be shutted down. I'm using Fedora 19 and C++. I'm able to catch a shutdown signal given by the console with the ...