Restart and shutdown Linux system

Linux is a stable and reliable operating system. A properly setup Linux server can operates a whole year without a single restart. Software updates and patches doesn't need a system restart. A Linux server only need to be restart or shutdown only in certain circumstances such as hardware failure or hardware upgrade.

Nowadays, Linux is not only a perfect choice for a server system but as a desktop computer as well. Ubuntu, openSUSE and Fedora are some of the popular choice to be installed on a desktop computer and a laptop computer. Even as a desktop operating system, Linux still doesn't need a restart during normal updates. But a normal desktop computer or a laptop doesn't need to be up 364 days a year. Here is a guide on how to bring down your Linux system, restart and shutdown.

Restart Linux system

In windows operating system, we use the term restart, which means to bring the operating system down and then start the operating system again. Normally the Windows operating system restart is needed to finished some tasks that you perform such as installing a new software or application or patched the operating system for security reason.

In Linux environment, the term reboot is used instead of 'restart'. You can use 'reboot' command to restart Linux operating system. Just type reboot in the Linux command line and press enter. Of course you need to be root or have root privilege to reboot Linux system. See the reboot command example below which is run in Slackware command line terminal:

[email protected]:~# reboot

You can also use shutdown command to reboot your Linux system. Type 'shutdown -r now' and press Enter to reboot. See the command example below:

[email protected]:~# shutdown -r now

The '-r' option is for reboot.

Another command to bring down your system is init. Init is the parent of all Linux processes. Its primary role is to create processes from a script stored in the file /etc/inittab. For more information about init, check system startup process tutorial.

To restart a Slackware Linux using init, type init 6 at the command line. Below is an example of restart a Linux system using init command:

[email protected]:~$ init 6

However in the latest Ubuntu release, you can't find /etc/inittab anywhere. Below is a part of information about Ubuntu runlevel if you want to use init command:

The RUNLEVEL argument should be one of the multi-user
runlevels 2-5, 0 to halt the system, 6 to reboot the system
or 1 to bring the system down into single-user mode.

From the information above, we know that we can reboot Ubuntu system using init 6 command (the same as Slackware).

Power off Linux system

In Linux we say 'power off' a Linux system if we mean to completely shutdown our system. The Linux halt command is used to power off Linux operating system. Just like the Linux 'reboot' command, type 'halt' in the Linux command line terminal and press Enter. See halt command example below:

[email protected]:~# halt

Halt will stop the system after properly terminate all Linux processes. In some computers, halt automatically switch off computer power (complete shutdown) while on some other computers, you need to push the computer ON/OFF switch to power off.

You can also use Linux shutdown command to power off your Linux system. We have seen shutdown command in the restart guide above. To power off a Linux system using 'shutdown' command, type shutdown -h now in the command line terminal and press Enter. See the example below:

[email protected]:~# shutdown -h now

The '-h' option is for halt.

To power off Linux system using 'init', type init 0 at the command line. It's the same for Slackware Linux and Ubuntu. See command example below:


[email protected]:~$ init 0

Back to Linux basic commands main page.

Add new comment