When to Restart a Linux Machine

A Linux machine never needs to reboot, until it does.


Linux is known for its stability and reliability. Personally, I never rebooted my Linux machine until recently I realized that it is still running an old kernel version despite its being upgraded multiple times. To load the newer kernel, I had to reboot the machine.

Frankly speaking, the old kernel runs just fine. The only reason to reboot is to load a newer kernel. Sometimes it might matter, for example when there are security updates. To find out whether a reboot is needed, you can check for the versions of the running kernel and the kernel installed on the hard drive.

$ uname -r # version of running kernel
4.10.13-1-ARCH
$ file /boot/vmlinuz-linux # kernel on the hard drive
/boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 4.10.13-1-ARCH (builduser@tobias) #1 SMP PREEMPT Thu Apr 27 12:15:09 CEST 2017, RO-rootFS, swap_dev 0x4, Normal VGA 

If the output of the two commands shows different versions, a reboot is suggested.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax