How do I shut down or reboot from a terminal?


Answer #: 1

For shutdown:

sudo poweroff

For restart:

sudo reboot

Answer #: 2

Open your terminal with CTRL+ALT+T and do these following commands

To shutdown the system:

sudo shutdown -h now

To restart:

sudo reboot

& one more command for restart:

sudo shutdown -r now

Another way as one of the user mentioned.

For shutdown:

sudo halt


sudo init 0

For restart:

sudo init 6

You can get more info on the shutdown command by using one of the following:

shutdown --help man shutdown

Answer #: 3

Hate passwords (sudo) and love one-liners?


/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop


/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart


0 0

Linux shutdown / reboot command

On Linux, like all tasks, the shutdown and restart operations can also be done from the command line. The commands are shutdown, halt, poweroff, reboot and REISUB keystrokes.

In this post I am going to show you how to shutdown or restart a linux system using these commands. The commands are useful specially when you have to reboot a remote linux server, where only shell access is available and no gui. Servers often need a restart when upgrades are installed or need to shutdown for other maintainance tasks.

The commands are available on any linux system like centos, ubuntu, debian, fedora or suse and do not require the installation of any extra packages.

1. shutdown command

The first command is the shutdown command and it can be used to shutdown a system or restart it. It is commonly used to shutdown or reboot both local and remote machines.

shutdown arranges for the system to be brought down in a safe way....
0 0

Some time if you have a dedicated server or you have access to a server that have Linux as Operating System and you want to restart or reboot or shut down the computer you can do this from putty after you’re connected to that system. Since you are logged in with putty you have access to terminal. Well, connected with putty mean the same thing with terminal so all commands from putty will work on terminal too and vice versa.

How to remotely Reboot/Restart Linux System from Terminal

Firstly you have to know that REBOOT is some thing as RESTART and is different by SHUTDOWN. Well if you want to reboot you can type simple in putty: reboot and the system will going to reboot.

Remember that --help work on any command that you don’t know how to use. For example: command --help and you will get help for the command such as syntax and how to use..

If you want to know more you can take a look at usage of reboot, you can see that by writing in terminal reboot...

0 0
W7 SHUTDOWN /s /t 60 /c "Shutdown in progress, leave the vicinity immediately" Shutdown in 60 seconds, with warning message Use -m \\remote_computer to shutdown/logoff a remote computer. W7 SHUTDOWN /p Immediate shutdown without warning W7 SHUTDOWN /l Logoff W7 SHUTDOWN /h Hibernate (or sleep if hibernate is disabled) XP Pro NLTEST /server:localhost /shutdown:"Shutting down, just for fun" 60 Shutdown in 1 minute, displaying the "reason" in a popup Use a remote server name instead of localhost to shutdown that remote server. XP Pro NLTEST /server:localhost /shutdown_abort Abort the shutdown in progress Use a remote server name instead of localhost to abort a shutdown in progress on that remote server. XP Pro WMIC OS Where Primary=TRUE Call Shutdown Immediate shutdown Use WMIC's /NODE switch to shutdown a remote computer. XP Pro WMIC OS Where Primary=TRUE Call Reboot Immediate reboot Use WMIC's /NODE switch to reboot a remote computer. XP Pro WMIC OS Where...
0 0

Please provide following info:

1. Is this your first experience with Ubuntu? If not, did it happen with previous versions?
2. Was behaviour okay prior to some update, or has this been the behaviour from the start?
3. Did you change any settings? eg. configuration files? If so, what did you change?
4. Do you have external devices attached to your laptop? eg. USB drive? Name all.
5. Are you running 32-bit or 64-bit? Please post back output of

Google shows that there can be any one of half a dozen reasons for this behaviour. You may wish to start with the least disruptive options first:

1. Install laptop-mode-tools which may install enough laptop config settings to allow Ubuntu to poweroff elegantly. After install, choose laptop mode.


sudo apt-get update && sudo apt-get install laptop-mode-tools

2. If above doesn't solve your problem and you don't need the wake-on-lan feature, then go into BIOS and turn this feature...

0 0

How to safely shutdown or reboot your raspberry pi (Debian/Raspbian)

(If you came here because your B+ won’t fully shutdown, visit this page.)

Of course, we all know you can shut down any computer by pulling the plug or switching off the switch. Most PCs can be forcibly switched off – even when they’ve crashed – by holding the power button down for 3 seconds. But we also know, or should know, that doing this isn’t good for the computer. For desktops and laptops, it can cause problems on the hard disk drive. For the Raspberry Pi, it can cause problems on your SD card. In fact it can corrupt your SD card so that you have to re-image it. Not a huge deal, unless you’ve just done a long compile and not yet backed up the files. :cry:

In the short month I’ve been ‘Pi’ing, I’ve only had one card need re-imaging (running an early version of OpenELEC). I don’t think it was down to an “unofficial hard reboot”* though because I don’t generally do them. I found out very...

0 0

By Gary Newell

Updated April 20, 2016.


In this guide I am going to show you how to shutdown and reboot your system using the Linux command line.

Most people use graphical desktop environments nowadays and therefore they shutdown using the relevant menu option.

If you have a single board computer such as the Raspberry PI or you are running a headless computer (one without a display) then you might want to know how to shut the computer down and restart it without physically pulling the power.

How To Shutdown Your Computer Using The Linux Terminal

The command required to shutdown your machine is as follows:


It is highly likely that you need to have elevated privileges to use the shutdown command so you are more likely to use the sudo command as follows:

sudo shutdown

The output from the above command will say something along the lines of "shutdown scheduled for , use shutdown -c...

0 0


First I tried this
[root@iqaudio ~]# reboot
packet_write_poll: Connection to Host is down

Nothing special, but it may take some time (minutes) to reboot this way.

Host is down! Yes because you forced a reboot.

Then this
[root@iqaudio ~]# sh /var/www/command/rune_shutdown
Stop MPD and unmount shares...
Updating DB (#1) ...
volume: 71% repeat: off random: off single: off consume: on
[root@iqaudio ~]# reboot
packet_write_poll: Connection to Host is down

Also nothing special.

MPD does a data base update at the moment.

This takes some time depending on the size of your music library.

And then this
[root@iqaudio ~]# sh /var/www/command/rune_shutdown reboot
Stop MPD and unmount shares...
volume: 71% repeat: off random: off single: off consume: on
[root@iqaudio ~]#

This doesn't execute the "reboot" command!

So also nothing...

0 0

Hate passwords (sudo) and love one-liners?

For Ubuntu 14.10 or earlier:


/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop


/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

Other commands you may like:


/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

Hibernate: (if enabled on your system)

/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

For Ubuntu 15.04 and later:

(This is due to Ubuntu's shift in using systemd instead of Upstart)

systemctl poweroff systemctl reboot systemctl suspend systemctl hibernate systemctl...
0 0

Solaris is usually used as a server operating system. Because of this, you want to make sure that you shut the system down as gracefully as possible to ensure there isn’t any data loss.

For every application that is installed on your server, you should make sure that you have the correct scripts in /etc/rc(x).d to gracefully shut down the service.

You have more than one command option that you can use. The best command is this, executed as root:

shutdown -y -i5 -g0

This will immediately shut the system down. You can also use the older command that still works:

sync;sync;init 5

You can even use:


If you are trying to reboot the system as opposed to turning it off, you could use:

shutdown -y -i6 -g0


sync;sync;init 6

Or even:


So many commands to do the same thing… almost seems...

0 0

Ubuntu is a distribution of the GNU/Linux Operationg System which in turn belongs to the Unix system family - a common architecture for a number of modern Operating Systems.

Traditionally Unix used to run on mainframe computers. Central computing facilities which serve dozends or hundreds of users via remote terminals. Since all users relied on the availability of the mainframe, no single user was allowed to issue a shutdown command. An idea that is fundamental to the Unix architecture - the system kernel will never initialise a shutdown unless the according function is called by a superuser process.

In contemporary desktop systems developers have gone through certain pains to make the shutdown available to the mere desktop user. A common technique is, to let the login manager, which usually runs in the security context of the root user, handle shutdown and reboot. In this case the graphical shell issues a request to the login manager to shutdown the computer. This...

0 0

If you run remote desktop sharing or terminal services, then someone may, in fact, be logged into a separate session on your computer. This typically requires Windows 2000 or 2003 server for true simultaneous multiple sessions.

Fast user switching is another case where more than one person can be "logged in" to your machine at the same time. Only one logged in user can actually be seen and used, but the other remains logged in in the background. In Windows, if you select "Switch User" when you Log Off, you're not actually logging off; instead, you're simply putting the current user into the background and logging in as a second user. Fast User Switching must be enabled for this feature to work.

In both of the cases above, if you attempt to shut down your machine, you'll get the warning "There is another user logged onto your computer" because there is. Either the remote desktop user, or the account that you switched away from. Naturally shutting down the machine will...

0 0
I've had this same problem for the past week and there is a really simple fix. I wasted lots of time rooting my phone and trying different apps so I'm trying to post this everywhere I can find. Obviously without a power button you have two problems: 1) you can't turn the screen on and off 2) you can't turn the phone on if the battery completely dies or is removed.

Solution to not being able to turn screen on and off
-Download one of the many apps that uses the accelerometer and/or proximity sensor to control the screen (such as 'Awesome On Off')

Solution to not being able to power on the phone
-Use "recovery mode" to turn the phone on and then click to restart the phone. Google search for how to enter recovery mode for your specific device, but for the Galaxy S2 Skyrocket you turn the phone off, disconnect the charging cable, and while it's off you press and hold both volume buttons at once. While holding these buttons you connect the usb charging cable and a...

0 0

There are some low level keyboard shortcuts available. They talk directly to the kernel and can break things. You probably shouldn't use these. But in the interest of counter-acting the atrocious answers recommending this method, here's how to use the SysReq button to shutdown or reboot your system. If your cpu bursts into flames because of these incantations, well, can't say I didn't warn you.


There is a mnemonic here: busier backwards. As in, you are too busy to shutdown properly, so you are doing it backwards.

alt + SysRq + r , e , i , s , u , b

I jacked this from wikipedia*:

unRaw (take control of keyboard back from X), tErminate (send SIGTERM to all processes, allowing them to terminate gracefully), kIll (send SIGKILL to all processes, forcing them to terminate immediately), Sync (flush data to disk), Unmount (remount all filesystems read-only), reBoot (durr)


This is the same except at the end use o for...

0 0

If you've ever wanted to remotely reboot a Windows box from your Linux machine, the Command-Line Fu web site has you covered with the quick and easy command to use.

In order to actually use this command, you'll need to make sure that you have the samba-common package installed for Ubuntu, or the corresponding package for your Linux distribution. The simple sudo apt-get install samba-common command will do it for any Debian-based Linux.

Now you can reboot a machine remotely with the following syntax, making sure to use a username that has administrative privileges on the Windows box:


If you omit the password section, you'll be prompted on the command line for the password—which might be more secure if you are worried about somebody looking through your terminal history. You can add the -f parameter to force a shutdown, which might be necessary to make sure the remote machine actually shuts...

0 0

Windows includes Shutdown.exe, a simple utility for remotely shutting down or restarting Windows computers on your local network. To use Shutdown.exe, you must first configure the PCs you want to shut down or restart remotely.

Once you’ve configured the PCs, you can use a graphical user interface or command to restart the PCs from another Windows system. You can even remotely shut down or restart the PCs from a Linux system.


The remote registry service must be enabled on each computer you want to shut down remotely – it’s disabled by default.

To enable it, first launch the Services control panel on the computer you want to shut down remotely. To do this, click the Start button, type services.msc into the Start menu and press Enter.

Locate the “Remote Registry” service in the list, right-click it and select Properties.

From the properties window, set the Startup type to Automatic and click the Start button to...

0 0
0 0