Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Maybe a bash command or something?

share|improve this question
Please add your OS, even though everyone already assumes it's Linux – Ivo Flipse Sep 24 '09 at 14:23
BTW: is there any reason you need a reset if you can simply use the normal shutdown options? Reset is only required if your computer is stuck or you lack GUI options to perform the action – Ivo Flipse Sep 24 '09 at 14:27
make sure, if you're on a remote system, u shut down the right machine :) always double check ur on the right machine – Roy Rico Sep 25 '09 at 21:20
up vote 8 down vote accepted

Different versions of linux have different commands to shutdown and reboot the computer. Either provide the OS and distribution you're using, or try these commands:

  • shutdown -r now
  • init 6
  • reboot

If you want to only power it down, use:

  • shutdown -h now
  • halt
  • poweroff
  • init 0

Both sets of commands typically need sudo permission to execute.

share|improve this answer
It's init 6 for a reboot. – Dave Webb Sep 24 '09 at 15:50
@Dave Thanks. I compiled the whole answer under the assumption user wanted to halt the machine. You're right, it's init 6 for reboot and init 0 for halt. – nagul Sep 24 '09 at 16:00
I typically use reboot and halt -p (halt and power off) – Roy Rico Sep 25 '09 at 21:19

Since you are asking about a "bash command or something", I assume that you are on Linux or something. Try this:

sudo shutdown -r now

This will restart the machine.

share|improve this answer
On some distros you need SU privileges in order to execute this command. So if this won't work for you try putting sudo at the front of shutdown -r now. – Mike Sep 24 '09 at 14:25
Never personally seen a distro that didn't require superuser for this. I have always needed to use sudo. – Joshua Nurczyk Sep 24 '09 at 14:45
Good point. Edited the answer accordingly. – innaM Sep 24 '09 at 14:49
And by the by: when I was a newbish Linux user, there was no other option. – innaM Sep 24 '09 at 15:27
Some Unix systems do not require root privileges to shutdown a machine locally. The rationale being that a user with physical access to the big red button will use it if other methods are not available. I think this is wise. I have an Ubuntu VM from a default install. It requires root to use shutdown, but allows me to turn the machine via Gnome without root. Same thing with OpenSolaris. This seems odd. – Richard Hoskins Sep 24 '09 at 16:04

If you have Magic SysRq enabled in your kernel, you can use alt+printscreen+(char) even if your system is relatively broken. (for example, if X is hosed)

Don't use this approach unless you can't do a normal shutdown -- shutdown -r now or similar is far better if you actually have a usable command line.

share|improve this answer

Well, assuming you run the bash on some Unix environment, you should have shutdown command, which has "-r" option for rebooting.

Manuals for this can be found by issuing "man shutdown" command, or by checking this page for BSD or this page for Linux versions of the shutdown.

share|improve this answer

Right click on any blank space of windows desktop -> New -> Shortcut. A “Create Shortcut” window will open.

In the blank, type in: shutdown.exe -r -t 0
Click “Next” button for next step. Type in whatever name you like in the blank. I use “Restart”. Then, click “Finish” button.
You can also set “Shortcut key” in the shutdown shortcut’s propertise to shutdown computer using keyboard shortcut.

share|improve this answer

For SysV style: shutdown -g0 -y -i6

For BSD style: shutdown -r now

share|improve this answer

Two sequential CTRL+ALT+DEL commands will reset Windows* machines.

* I haven't used this since XP...

share|improve this answer
not anymore, not for a while – emgee Sep 24 '09 at 16:22
did even XP allow this? I thought it went out when NT came along. – Phoshi Sep 24 '09 at 16:24
I have occasion to use it on XP machines around here. Still works. – Brian Knoblauch Sep 24 '09 at 16:51
This doesn't work on XP. – William Hilsum Sep 24 '09 at 18:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .