a command to turn off or reboot the system

learn more… | top users | synonyms

2
votes
0answers
46 views

Properly power down SSD during shutdown

I recently got a Samsung SSD. I have debian wheezy installed on it. I carry it around in a USB enclosure and boot both my work and home computers from it. How can I ensure that the system properly ...
2
votes
1answer
45 views

Shutdown script seems to be executed twice

I have a small backup bash script that I wrote for my computer at work. I have copied the script into /etc/rc0.d/ and called it K01backup so it is executed before anything else upon shutdown. It backs ...
0
votes
1answer
32 views

Shutdown so fast on iMac

I'm using Ubuntu 14.04 on iMac 27 in dual boot with OSX via rEFInd. It works nice but when I click to shutdown the Ubuntu it is so quickly and the screen becomes black in 1 or 2 seconds. So I can ...
1
vote
1answer
50 views

Why does my script does not run in runlevel 0?

I made a script with following LSB header #! /bin/sh ### BEGIN INIT INFO # Provides: updateservice # Required-Start: $local_fs $time $network $named $syslog # Required-Stop: $local_fs ...
6
votes
5answers
890 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 ...
0
votes
1answer
45 views

how to reboot multiple computer using bash loop from the txt file

can anyone knows how to reboot computer in just one line code of bash (by looping itself). The details will be get from the text file which are the IP Address of each computer. When the script gets ...
1
vote
1answer
32 views

On shutdown, do un-mounting drives happen before shutdown signal handling?

So based on my understanding of the Unix/Linux shutdown process (which is highly limited I admit), I think at some point these steps happen: 1. mounted drives get unmounted 2. a termination signal ...
2
votes
1answer
77 views

shutdown program doesn't terminate after scheduling a shutdown

I'm having a bit of trouble with my home server (running Debian 7.7). When trying to schedule a shutdown, the following occurs: serverbox:~ $ sudo shutdown -h +10 Broadcast message from ...
0
votes
0answers
83 views

system won't poweroff, restarts with :“Synchronizing SCSI cache”

Running Debian testing, after a system upgrade a while back my machine started to refuse to power down. It hangs with: Synchronizing SCSI cache Waits a few seconds, and then reboots itself. It ...
3
votes
0answers
45 views

Bad/strange USB device issue: failed to shutdown/restart

On a fresh Arch Linux installation with Intel i7 processor and an Nvidia graphics card, I noticed during boot log messages related to a usb device filled the screen before it reached the graphical ...
18
votes
4answers
2k views

Is there a fastest way to shutdown the system?

Or is shutdown -h now the fastest it can get? I look for some syscall or similar that will allow to skip lots of the stuff done prior to shutdown (in particular to care about the running proccesses). ...
2
votes
1answer
43 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 & ...
1
vote
0answers
71 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 ...
1
vote
0answers
117 views

RTC is not saving time after hwclock

So I'm having quite a bit of trouble trying to get my system to set the hardware clock's time. Here is what I did just now, everything has worked, right? The first and last command seem to indicate ...
4
votes
0answers
75 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 ...
0
votes
1answer
61 views

How to prevent from automatic reboot after shutdown?

I have a problem with shutting down my systems. When I shutdown my laptop everything looks normal but after few seconds it powers on by itself. I tried to shut it down through terminal with "shutdown ...
0
votes
2answers
69 views

How to create a promptless Linux GUI shutdown script?

I want to shutdown my Linux system using a script from GUI: shutdown.sh #!/bin/bash init 0 This script asks me a question. I need a shutdown script without asking any question. Note that my GUI ...
1
vote
1answer
53 views

Show shutdown messages from last shutdown [duplicate]

Where does Linux store the shutdown messages from last shutdown?
1
vote
0answers
65 views

Triggering a server to shutdown in receiving a signal via serial port (RS232)

I'm a fresh graduate (Electronics & Commn) and want to start my career in linux administration. I'm using a Ubunutu 14.04 server machine for R&D (with ups). Now my scenario is whenever main ...
0
votes
0answers
95 views

Fedora not shutting down

Whether I do shutdown -P now or sudo shutdown --halt now Fedora does not shutdown. It will send SIGTERM and SIGKILL as usual, but then just stops at the screen with the fedora logo. My only option is ...
3
votes
1answer
230 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
1answer
221 views

what is oldroot?

When I shutdown my laptop there are some messages like unmounting oldroot/* They came after a kernel-update, just curious what this means and if I need "oldroot"
2
votes
1answer
100 views

How can I investigate what other users are currently logged in?

Since the last few days I get an error message when I try to shut my laptop down: System policy prevents stopping the system when other users are logged in This error message includes a prompt ...
2
votes
0answers
177 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, ...
3
votes
0answers
76 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
390 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 ...
5
votes
1answer
1k views

Debian won't shut down completely

My Debian wheezy (64-bit) won't fully shut down. What I mean by this is that when I select "Shut Down..." from the menu the screen goes blank but the power button remains lit and front fan keeps ...
1
vote
1answer
751 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 ...
2
votes
0answers
123 views

Shutdown doesnt work

I've installed dwm window manager on linux mint 15, configured it and now shutdown doesn't work. I typed shutdown -P now in terminal, dwm closed successfully and now I'm seeing black screen with: ...
4
votes
2answers
68 views

Detecting a “plug pulled” scenario with Linux

I was wondering if it's possible to detect a shutdown due to power loss on a Linux system. (Power loss defined as: pressing reset button, pressing power button, pulling the power cord) If so, how? ...
1
vote
3answers
98 views

How do I shutdown the system after a particular process exits

I am downloading some software; I can see the pid of the download process with top. Let's say it's 1001. How can I make it so that my computer shuts down after process 1001 exits?
0
votes
0answers
91 views

Ubuntu displays Shutdown window then turns off system

Some weeks ago, I've downloaded unetbootin both Windows and Linux versions to make a startup Ubuntu USB. I was going to use it to rescue my damaged Ubuntu partition. Tried the Linux version but didn't ...
4
votes
0answers
176 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 ...
2
votes
1answer
1k views

Shellscript! Syntax error: unexpected “(”

Update: After the changes from the first answer I got some more error codes. : not found: line 23: { esxidown.sh: line 24: redir error Insufficient arguments. : not found: line 26: esxidown.sh: ...
2
votes
1answer
96 views

How does `shutdown -k` disable logins?

This is the -k option's documentation in man shutdown (at least on Ubuntu): -k Only send out the warning messages and disable logins, do not actually bring the system down. I initially ...
11
votes
3answers
921 views

Graceful shutdown in ArchLinux

I'm trying to get a graceful shutdown/reboot in ArchLinux with GNOME Shell. Now, when I ask for shut-down, it immediately shuts down without giving open programs time to gracefully close / save open ...
9
votes
2answers
2k views

How does the system shutdown of a linux kernel work internally?

I have somehow an rough idea of how the userspace and init-system (be it classic init sysV /upstart/ systemd) work at system shutdown. (Essentially there is an order succession of "Stop!", "Please ...
0
votes
1answer
82 views

How can Window Managers shutdown the computer? [duplicate]

When logged in to a virtual shell as an unprivileged user and try to shutdown, reboot, init 0 or init 6 don't work. But if you're running a desktop environment, you can easily select its shutdown ...
8
votes
3answers
5k views

How to shutdown Linux at a specific datetime from terminal?

It seems I can shutdown using sudo shutdown by specifying a time or minutes. Is there a way to specify datetime for shutdown?
2
votes
1answer
2k views

How to change Power button shutdown action

I use Mageia ver 4 Linux as server, without X started and without any user login-in during normal operation. This PC has a special card for measuring and control of other devices. This card has its ...
0
votes
0answers
15 views

How do I run a command if my server wakes up from hibernate? [duplicate]

How do I get a bash command executed each time when my server wakes up from hibernate? For ex. I want to restart my XBMC on Ubuntu when my PC wakes up with $ sudo killall xbmc.bin -9 Where should ...
2
votes
0answers
614 views

Ubuntu 12.04 / Elementary OS - Shutdown Problem / Logfiles

I have new Desktop PC on which I've installed Elementary OS, based on Ubuntu 12.04 LTS. The problem: the system doesn't shut down as expected: When using the 'Shut Down' option from the main menu, or ...
3
votes
1answer
198 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 ...
0
votes
1answer
250 views

Should tmpfs be unmounted at system shutdown?

Assume I have a linux system with the following partitions mounted (beside root): proc on /proc devtmpfs on /dev devpts on /dev/pts tmpfs on /dev/shm sysfs on /sys tmpfs on /var/run tmpfs on ...
1
vote
1answer
768 views

Why is “Asking all remaining processes to terminate” failing during shutdown?

I installed Debian 7. Sometimes when I quick X and type sudo shutdown -h now, it says, Asking all remaining processes to terminate, then after a few seconds, it prints a long list of processes, then ...
1
vote
3answers
1k 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 ...
5
votes
3answers
261 views

Can I make the O/S drive READ ONLY and prevent metadata write back?

Sorry to ask a (probably) stupid question. I am a hardware designer struggling with provision of safe shutdown power to an embedded system. I am aware the Linux normally makes a heavy use of the ...
1
vote
2answers
1k views

An init-script does not get called on shutdown

I have set up an init-script to control the state of a VirtualBox VM: #!/bin/sh #chkconfig: 35 99 5 #description: vTiger virtual machine ### BEGIN INIT INFO # Provides: vtigervm # Required-Start: ...
2
votes
1answer
1k 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
1answer
445 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.