1

Maybe a bash command or something?

3
  • 5
    Please add your OS, even though everyone already assumes it's Linux
    – Ivo Flipse
    Sep 24, 2009 at 14:23
  • 1
    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, 2009 at 14:27
  • 1
    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, 2009 at 21:20

7 Answers 7

8

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.

3
  • It's init 6 for a reboot.
    – David Webb
    Sep 24, 2009 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.
    – user4358
    Sep 24, 2009 at 16:00
  • I typically use reboot and halt -p (halt and power off)
    – Roy Rico
    Sep 25, 2009 at 21:19
3

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.

8
  • 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, 2009 at 14:25
  • Never personally seen a distro that didn't require superuser for this. I have always needed to use sudo. Sep 24, 2009 at 14:45
  • Good point. Edited the answer accordingly.
    – innaM
    Sep 24, 2009 at 14:49
  • 1
    And by the by: when I was a newbish Linux user, there was no other option.
    – innaM
    Sep 24, 2009 at 15:27
  • 1
    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. Sep 24, 2009 at 16:04
1

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.

0

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.

0

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.

0

For SysV style: shutdown -g0 -y -i6

For BSD style: shutdown -r now

0

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

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

4
  • not anymore, not for a while
    – emgee
    Sep 24, 2009 at 16:22
  • 1
    did even XP allow this? I thought it went out when NT came along.
    – Phoshi
    Sep 24, 2009 at 16:24
  • I have occasion to use it on XP machines around here. Still works. Sep 24, 2009 at 16:51
  • This doesn't work on XP. Sep 24, 2009 at 18:12

You must log in to answer this question.

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