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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 6 : How do I find my current runlevel?

by admin

The output of the runlevel command will indicate your previous and current runlevel separated by a single space. If there was no previous runlevel ‘N‘ will be used as a placeholder.

For example:

# runlevel
N 5

The output above indicates that the current runlevel is 5 and there was no previous runlevel.

Changing current runlevel

To change the runlevel for a system without rebooting or changing the /etc/inittab file, execute the following command as the root user:

# telinit [runlevel_value]

With [runlevel_value] having the following values:

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

Filed Under: Linux

Some more articles you might also be interested in …

  1. showmount Command Examples in Linux
  2. Beginners guide to vi editor (command line reference)
  3. How to Configure rsyslog to Filter/discard Specific IP Address in CentOS/RHEL 6,7
  4. hdiutil Command Examples in Mac
  5. How to Recover from a Corrupted or empty /etc/mtab file in CentOS/RHEL 7
  6. Active FTP vs. Passive FTP
  7. UNIX / Linux : How to delete root equivalent user (Non-Root User with UID 0)
  8. How to view past performance with sar in Linux
  9. How to Create and Mount Btrfs Snapshots
  10. CentOS / RHEL : How to get the date and time of executed command in the history command output

You May Also Like

Primary Sidebar

Recent Posts

  • What are /dev/zero and /dev/null files in Linux
  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright