a command to turn off or reboot the system

learn more… | top users | synonyms

3
votes
2answers
71 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 ...
4
votes
2answers
5k 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 ...
5
votes
1answer
499 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 ...
0
votes
3answers
2k 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.
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 ...
10
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 ...
4
votes
3answers
5k 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
1answer
28 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 ...
2
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 ...
39
votes
9answers
118k 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 ...
2
votes
1answer
186 views

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

I stumbled upon a weird behaviour of my BunsenLabs 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 sudo ...
1
vote
1answer
90 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
48 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: ...
0
votes
0answers
17 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
36 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
30 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
34 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.
2
votes
2answers
558 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 ...
3
votes
1answer
303 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 ...
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
370 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
99 views

Sudden shutdown happens only when I have PhpStorm opened

I've had this reoccuring 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 ...
0
votes
1answer
72 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
1k 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
32 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 ...
0
votes
1answer
544 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 ...
1
vote
0answers
19 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 ...
1
vote
1answer
122 views

Disable “shutdown” and “poweroff” command in Ubuntu

I want to disable "shutdown" and "poweroff" CLI commands in Ubuntu for a specific user. How to do it?
0
votes
1answer
93 views

Does a Linux brand cause a Dell Latitude D620 notebook to hang during reboot process?

Recently, I installed Linux Trisquel 6 on a Dell Latitude D620 notebook (dual core cpu, 2GB DDR and 60GB hard drive), where previously Windows XP was installed. But Trisquel doesn't seem to support ...
0
votes
0answers
32 views

Kernel-space call orderly_poweroff not work - wait for completion

[kernel ver. 4.1] My big problem: my kernel-space driver call orderly_poweroff(true), but after that there is no reaction form Linux side (OS will still work). After a while, I received log form ...
3
votes
2answers
1k views

message at shutdown: watchdog did not stop!

At shutdown I often get the message watchdog did not stop! and then the laptop freezes after few other lines without shutting down. Any idea on how to fix this? Recently it happened very often, ...
2
votes
1answer
64 views

cannot connect with ssh to linux after shutdown command

i've used command shutdown -h 12:55 (for example), and linux server shutdowned at this time, but when I'm trying to connect with ssh I receive the message: "The system is going down on Thu Dec 31 ...
1
vote
3answers
39 views

Shutdown PC after suspending terminal process (apt-get upgrade)

What's going to happen if I shutdown my PC after suspending a terminal process (with Ctrl+Z)? In my case, it's sudo apt-get upgrade. The upgrade file size is 250 MB, it takes far more time downloading ...
3
votes
1answer
153 views

How to run an executable with systemd before NetworkManager shutsdown

I am trying to run an executable, right before shutdown, that needs NetworkManager running. Here is the service file that I currently have (located in /lib/systemd/system), and it works fine if I have ...
7
votes
6answers
2k views

Can you make a linux system halt and boot my Raspberry-pi at certain times?

How to make a system turn itself off and back on at different times. For example I would have my "server" turn off at 4 A.M then turn back on at 5 A.M every day. Is this possible? I am using a ...
55
votes
6answers
5k views

Why does reboot and poweroff require root privileges? [duplicate]

To restart or shut off Linux from the terminal, one can use reboot and poweroff, respectively. However, both of these commands require root privileges. Why is this so? What security risk is posed by ...
1
vote
2answers
780 views

How to shutdown the computer from SLiM when root login is disabled?

I installed the SLiM login manager on Debian Wheezy and disabled the root account's ability to login, as described in this Debian Wiki article, so sudo <command> must be used to run anything as ...
4
votes
1answer
1k 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 ...
3
votes
2answers
5k 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
0answers
100 views

lenovo z-5170 hangs at Plymouth screen during shutdown or restart(elementary os)

When shutting down or restarting the computers hangs and I need to click on the power button. The message on the screen is: init: wait-for-state (plymouth-shoutdownlightdm) main proccess (2050) ...
1
vote
2answers
100 views

Use rtcwake without entering a password

I would like to execute something like rtcwake -m off -s 60 without entering a password. I used visudo to write the following line into /etc/sudoers: %sudo ALL = NOPASSWD: /sbin/shutdown, ...
0
votes
0answers
74 views

GTK Warning ** drawing failure

Currently On Debian Stretch: Relatively new to Linux and to this stack exchange any further information you may require i will update as requested. Thank you... Recently i have been struggling to ...
0
votes
1answer
109 views

'This webpage is not available' after 'shutdown -r now'

I've been having some MySQL issues so I tried to restart my server with shutdown -r now. I can SSH into it, but any page I try to navigate to now returns: This webpage is not available ...
0
votes
0answers
303 views

CentOS 7 NUT UPS Specify Shutdown

I've recently put my CentOS 7 server onto an Eaton 5E UPS and I am hoping to specify the Shutdown conditions. I've installed nut and done some basic configurations as suggested by ...
0
votes
1answer
42 views

How to schedule gap between shutdown and bringing up a AIX 6.1 host ?

I wan to shutdown an AIX 6.1 server immediately and then bring it up after 4 hours automatically ? Is that possible with shutdown command ?
8
votes
5answers
4k views

Can I allow a non-root user to log in when /etc/nologin exists?

Suppose a non-root user with sudo privileges executes a delayed shutdown (shutdown +10 or whatever) and logs out. Then, before the shutdown occurs, he wants to log back in and cancel the shutdown. The ...
0
votes
0answers
37 views

strange shutdown behaviour

Usually, when I plug in stuff (mostly hdmi cable) the laptop fails to shutdown. What happens is the following: I unplug everything, I try to shutdown from gui (or terminal), but at the very end of the ...
0
votes
0answers
52 views

Lightdm - call script on shutdown

I configured lightdm to call the following cleanup-script. Here the corresponding line in the lightdm.conf: ... session-cleanup-script=/usr/local/bin/call.logout.sh ... Here the script, which is ...