Help - Search - Members - Calendar
Full Version: rebooting a machine
The Planet Forums > Operating Systems > Red Hat Linux
wiser
Sorry if this seems noob question.

Never had to restart my machine but I need a quick restart icon_smile.gif.

Does anyone know the command that will reboot the machine?

Thanks in advance icon_smile.gif
alduin
QUOTE (wiser)
Does anyone know the command that will reboot the machine?

Try 'reboot'.
dezignguy
CODE
shutdown -r now


That's what I use...
scholzie
'init 6' will also work. It will switch you to "runlevel 6"

Init is the process control program. It starts processes as well as switches your current runlevel (and starting the processes set to run within that runlevel). Runlevel 6 is reserved for restart, and runlevel 0 is halt (however I dont suggest you do that on an SM box, unless you like making reboot requests icon_razz.gif ). Type 'man init' or 'man runlevel' to get more information about those two things. The 'reboot' and 'shutdown' commands give you a little more flexibility if you need to set extra options, like forcing a restart "right this very second" as opposed to shutting down the system properly, or setting a timed delay. However, for a standard restart, 'init 6', 'reboot', and 'shutdown -r now' will all do the same thing.

I know it's way more than you asked for, but I wish people told me these things when I was a newbie.
damainman
I think the best way is to just type: reboot

That does a graceful reboot, such as restarting windows, as opposed to just hitting the off switch and doing a forced reboot.
dezignguy
oh? I thought I read somewhere that shutdown -r now was the best thing to do.. for some reason or another. I didn't think it was a 'hard' reboot.

Why is 'reboot' better?

Are you saying it shuts down programs nicely, and then reboots the OS, instead of just hard rebooting?
alduin
QUOTE (dezignguy)
Why is 'reboot' better?

It's not. They do the same thing, at least when the box is in its normal runlevel.

From the reboot man page:
QUOTE
If halt or reboot is called when the system is not in runlevel 0 or 6, in other  words  when it's  running  normally, shutdown will be invoked instead (with the -h or -r flag). For more info see the shutdown(8) manpage.
HostOrbit
<sarcasm>Or you can simply type: "poweroff"

Then send a reboot request to SM. icon_lol.gif</sarcasm>
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.