• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

What is Runlevel in Linux

March 23, 2009 by Sharad Chhetri Leave a Comment

Do you know what is runlevel in Linux ? This is one of the important term use in linux. There are 7 Runlevel mode in Linux. In this post we will try to explain about runlevel in Linux Operating System.

What is runlevel

In linux the Runlevel is described as the state or mode that is defined by the services.These services are defined in directory /etc/rc.d/ . Given below is the output

[root@localhost ~]# cd /etc/rc.d/
[root@localhost rc.d]# ls
init.d rc0.d rc2.d rc4.d rc6.d rc.sysinit
rc rc1.d rc3.d rc5.d rc.local
[root@localhost rc.d]#

Here inside the directory /etc/rc.d/, there are some directories like rc0.d,rc2.d………rc6.d which represent the corresponding Runlevel.

These are the following Runlevel which are used in Linux
• 0 — Halt
• 1 — Single-user mode
• 2 — Not used (user-definable)
• 3 — Full multi-user mode
• 4 — Not used (user-definable)
• 5 — Full multi-user mode (with an X-based login screen)
• 6 — Reboot

For text mode Runlevel 3 is used and for GUI (Graphical User Interface) Runlevel 5 is used.

We can change the runlevel of Linux Operating System by updating runlevel value in /etc/inittab file.In /etc/inittab file there is a line…
id:5:initdefault:
Here 5 represent the Runlevel 5.If we write 3 instead of 5 in this line then machine will run in runlevel 3 in next system reboot.The /etc/inittab file is meant for by-default runlevel setting of the Linux Operating System.

For Shutting down the Machine we can use the command init 0.
And for system restart we can use the command init 6.

Examples:

For Shutting Down Linux System:

[root@localhost ~]# init 0

For Linux System Restart:

[root@localhost ~]# init 6

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Recover Linux Grub Password in linux rescue mode CentOS/Red Hat
  2. How to upgrade Linux Mint 15 to Linux Mint 16
  3. Use Linux Date Command As A Timezone Converter
  4. Easy steps to install latest google chrome in Linux Mint 15
  5. Linux command to find modified and access date of file/dir/filesystem
  6. How to install vim editor in Linux Mint
  7. Find exit status code of last executed command on Linux and Unix
  8. rsync over ssh port number on Linux/Unix system
  9. Remove python module installed from source code on Linux
  10. print new line character in Unix / Linux

Filed Under: Linux Tagged With: runlevel

Reader Interactions

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

How to configure htdigest in nagios server

postgres database backup script using database user password inside

send email after mysql backup through bash script in simple way

4 Different commands to find system uptime in linux

WordPress host IP changed not able to open wp-admin and site page looks scattered

How to change login banner message in GUI mode in CentOS 6 or above version.

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ·
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy