a command to turn off or reboot the system

learn more… | top users | synonyms

3
votes
2answers
479 views

systemd: running a script on shutdown after filesystems are mounted read-only

Is there a way to run a script on shutdown, after the file system is remounted as read-only? I've a raspberry pi connected to a wireless socket, which I can control via a sender and a script. I want ...
1
vote
1answer
33 views

Is the root filesystem unmounted during a Linux shutdown?

What it says in the title. If the root filesystem is unmounted, then how can init be accessed to run the last few steps that occur afterwards?
0
votes
0answers
21 views

Lubuntu - Cannot poweroff laptop when using swap

I'm using Lubuntu 16.04 on my Notebook HP Pavilion g6-2305sl, and I'm having some troubles apparently (I'm not really sure) connected to swap usage. I boot up with the command line login shell and ...
0
votes
2answers
44 views

Reasons for a server to be unreachable, How to investigate?

One of my server which host a mongoDB is, sometimes and "randomly" unreachable. After a while, it come back, like nothing happend. During this period, impossible to open an ssh tunnel (timeout, don'...
5
votes
2answers
2k views

A stop job is running for Session c2 of user

The following message appears almost everytime I shutdown my computer A stop job is running for Session c2 of user ... (1min 30s) It waits for 1min30s then continues shutdown process. I follow this ...
1
vote
2answers
35 views

How to set up an emergency power-off keyboard shortcut on Linux?

Some times when my laptop wakes up from standby or hibernation the screen backlight won't turn on and I can barely see anything in a dark room and just can't see anything when I'm outdoors. The only ...
0
votes
0answers
32 views

both USB ports randomly stop working

the problem usually occurs about once per day, seemingly at random, but occasionally two times, and occasionally zero times. devices connected are: a new STAR printer with it's own power supply, ...
-5
votes
1answer
40 views

The Linux shutdown process [closed]

Describe the typical Linux shutdown process for me. I don't know if there is a difference between a shutdown issued using shutdown and one issued by switching run levels, so explain both if there is a ...
3
votes
1answer
3k views

How to shutdown the computer from Openbox as a menu item?

How can I add a menu item to Openbox which launches a prompt to cancel or provide a root password, then shuts down X and the computer if the correct password was given? The question Shutting the ...
0
votes
0answers
29 views

Kali Linux Rolling not getting powered off and neither restarts

Kali Linux Rolling doesn't get powered off, neither does it restart! When I attempt turn off / reboot, the system freezes and does not respond. A black screen with nothing visible keeps on displaying ...
30
votes
3answers
34k 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
3answers
3k 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
0answers
28 views

Enable tty console login while “A stop job is running” (stop running forever, preventing shutdown)

A message like this one is often shown on shutdown: "A stop job is running ..." (nfs mount) This apparently even happens when the NFS server did not go away. But even if the connection to the NFS ...
1
vote
2answers
37 views

systemd: stop boot process on failure (actually make a shutdown)

How is possible to immediately stop the bootup process, show some message (quit splash screen) and shutdown machine if a oneshot service fails? My service starts just one script. If something went ...
23
votes
3answers
20k 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] ...
59
votes
5answers
133k 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?
0
votes
2answers
55 views

Shutdown as a Mac

I have a iphone app that can remotely shutdown a mac computer. I would like this app to shutdown my Ubuntu computer. I'm getting following messages from the application when trying to shutdown: When ...
0
votes
0answers
50 views

opensuse leap shutdown does not shut down correctly?

I have a new laptop (lenovo thinkpad t460p) With both Windows 10 and opensuse leap installed. If I shutdown my computer under opensuse leap (using shutdown button or even /sbin/shutdown 0); it appears ...
4
votes
2answers
732 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 ...
1
vote
0answers
31 views

Shutdown problem on Lenovo G50 after installing Linux Mint 17.3

After installing successfully Linux Mint 17.3 on Lenovo G50, its not rebooted. The error is : [397.188708] Fixing recursive fault but reboot is needed! [400.538090] init: mdm main process (2363) ...
4
votes
2answers
6k views

“A stop job is running…” on shutdown

Almost every time when I'm shutting down or rebooting the system I get the following message before the system actually shuts down: A stop job is running for Session 1 of user xy It waits for 1:...
0
votes
1answer
89 views

Linux mint 17.3 doesn't shut down

Just installed Linux Mint 17.3 with KDE on HP probook 6470B. Installation went well, the system said it was restarting - DVD was ejected and system seemed to shut down but it didn't. I tried Ctrl+Alt+...
1
vote
0answers
38 views

Dual Boot: Deepin Linux, Windows 10, now windows not shutting down [closed]

I have installed Deepin, later I installed Windows 10 Pro, x64 edition. The problem I have now is that my Windows won't shut down, I can restart it, but when I choose to shutdown, the screen goes ...
4
votes
2answers
71 views

Explanation of file - org.freedesktop.login1.policy

I am using Ubuntu 16.04. There is a file located at /usr/share/polkit-1/actions/org.freedesktop.login1.policy which seems to control the permissions regarding shutdown/suspend/hibernate options. ...
33
votes
2answers
2k 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 ...
0
votes
2answers
1k views

Computer doesn't power off at shutdown/reboot (Arch)

My computer doesn't power off when I try to shutdown or reboot it, I'm forced to press the power button. At shutdown, a single _ is displayed (sometimes blinking, sometimes not). At reboot, two ...
4
votes
3answers
6k 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 ...
1
vote
2answers
143 views

Sudden shutdown happens only when I have PhpStorm opened

I've had this reoccurring sudden shutdown issue happening recently, and it always happens when I have PhpStorm opened, I'm not sure if it's related, but it still seems random, meaning that sometimes I ...
4
votes
3answers
89 views

Shutdown procedure clarification

The book "How Linux Works" says the general shutdown procedure (independent of init system) is something like this: init asks every process to shut down cleanly. If a process doesn’t respond after a ...
3
votes
1answer
735 views

Debian won't shut down (Failed to start poweroff.target: Transaction is destructive)

I stumbled upon a weird behaviour of my BunsenLabs GNU/Linux. Sometimes I cannot turn off the OS. I doesn't matter whether I use sudo poweroff or the GUI approach. This is what I get after running ...
3
votes
2answers
158 views

Systemd : How to execute script at shutdown only (not at reboot)

There is a lot of solution here to execute a script at shutdown/reboot, but I want my script to only execute at shutdown. I've tried to put my script in /usr/lib/systemd/systemd-shutdown, and check ...
3
votes
1answer
1k views

Umount network drives with systemd before shutdown

My shutdown takes quite a long time (I'm on Debian 8.1) and I found out that it can be fixed by unmounting the network drive before shutting down the system. Apparently the network gets disconnected ...
11
votes
8answers
3k 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 ...
0
votes
1answer
41 views

Automating Backup and Shutdown

I want to backup my entire internal hard drive files into an external hardrive and execute system shutdown once the backup is finished. The reason why I want to do that is to execute the backup during ...
3
votes
3answers
5k 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 ...
42
votes
9answers
131k 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
1answer
144 views

Prevent shutdown using shell script run at shutdown

Background: I have a Python script that runs (infinitely) from startup in the background of a Ubuntu server. The process is ended by sending a SIGINT which is handled by the script which finishes all ...
1
vote
0answers
24 views

How does shutting down require sudo except when done through a GUI? [duplicate]

If I want to shut down my machine programmatically or on the terminal, I must do sudo poweroff or sudo shutdown. If I want to shut down my machine through my window manager and desktop environment, I ...
5
votes
6answers
4k views

How to disable shutdown so that an important process cannot be interrupted?

What is the simplest way to disable or temporarily suspend reboot/shutdown when an important process is running? The process takes too long to finish and cannot be paused/resumed so I like to avoid ...
1
vote
1answer
87 views

Why is a script in /etc/rc6.d not run on reboot?

I am trying to log shutdown/reboot on a Raspberry Pi. I am running latest Raspbian. This is my setup: cat /etc/init.d/log-shutdown.sh: #!/bin/sh ### BEGIN INIT INFO # Provides: log-...
0
votes
0answers
20 views

custom bootup/shutdown message

I am using Debian. I set my own image during boot (so no boot messages are visible). When I start PC my own image is shown, then approx 15 seconds black screen is visible and after that it shows my ...
0
votes
1answer
51 views

Running script at startup and exiting gracefully at shutdown

I am currently running a script at startup using /etc/rc.local. The problem is that during shutdown, it does not exit gracefully. This can cause (important) data loss. My script has a SIGINT handler ...
0
votes
0answers
35 views

What does system do to execute a logout?

I want to take a deep look on what system really does to execute a logout. For example, we can follow this guide to examine what system does in a boot/shutdown process. So I wonder if there are some ...
-1
votes
1answer
45 views

How to use crontab to shutdown linux for every saturday 3PM [closed]

Hi I want to create schedule on my Linux server to shutdown it every Saturday 5PM. How can I do it.
0
votes
3answers
37 views

Different ways of powering off

I prefer getting things done using the keyboard instead of the mouse. In Gnome to shutdown the PC, I have to click several times to shutdown my PC. I prefer to press Alt+F2 and type poweroff. My ...
2
votes
0answers
438 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 poweroff/...
0
votes
1answer
100 views

Ubantu slow boot and shutdown issue : how can I fix this?

Initially my boot time was really low, it used to boot in seconds and user processes were also up and ready to use within a minute, now for some reason my boot up really slow and also my system never ...
5
votes
2answers
2k 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 ...
1
vote
1answer
43 views

When a Linux (Ubuntu) system shuts down, which processes get sent a SIGTERM?

If I start an ongoing background process A which starts a child process B, and I ask the OS to shut down, which processes get sent a SIGTERM? Is it both A and B or is it just A (assuming that A should ...
1
vote
0answers
23 views

A machine running Ubuntu or Debian shutdown on reboot. What steps would you use to find what dev/driver is causing this?

Title is pretty descriptive. I have a few of the same board that shuts down on reboot but never restarts. It does this with Debian or Ubuntu (yes yes, two sides of the same coin,) but does not do it ...