11

I normally use reboot to restart my Linux box, but a friend said that I should use shutdown -r now instead. Is there any difference?

Looking at the man pages tells me something about run levels, but I'm hoping for an answer in simple English that a relatively inexperienced Linux user can understand.

1

2 Answers 2

7

Many Unix systems have reboot perform an instant reboot -- no syncing, no umounting, nothing. It's just like hitting the reset button.

Your friend is trying to save you hours of fscking, or worse, if you ever wish to reboot one of those systems.

1
  • 2
    For example, this is the behavior for reboot on Mac OS X, so already we're talking about the majority of deployed end-user UNIX systems. As per Shakedown's answer, this likely varies between different *NIX types.
    – NReilingh
    Commented Aug 13, 2010 at 6:16
4

There are likely slight differences in the functionality offered, but they can both be used to achieve the same thing. In fact, here's what the manual page for reboot says:

When called with --force or when in runlevel 0 or 6, this tool invokes the reboot(2) system call itself and directly reboots the system. Otherwise this simply invokes the shutdown(8) tool with the appropriate arguments.

Also, it appears that the RUN-LEVEL info for both operations is the same. Judging from the manual pages of both reboot and shutdown, it looks like shutdown provides a bit more lower-level functionality, and reboot is a higher-level tool that uses shutdown.

You must log in to answer this question.

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