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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

telinit: command not found

by admin

The telinit command enables you to switch the current runlevel of the system. On systemd environments, the telinit command will be translated into the appropriate target request. The runlevel command prints the previous and current runlevel of the system, each separated by a space.

Syntax

The syntax of the telinit command is:

# telinit [options] {runlevel}

If you encounter the below error while running the telinit command:

telinit: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install sysvinit
Ubuntu apt-get install upstart-sysv
Arch Linux pacman -S systemd-sysvcompat
Kali Linux apt-get install sysvinit-core
CentOS yum install systemd
Fedora dnf install systemd
Raspbian apt-get install upstart

Changing current runlevel using telinit

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. How to Change Default Permission of /var/log/messages in CentOS/RHEL
  2. Audit Log And Messages File Not Rotating on CentOS/RHEL
  3. file Command Examples in Linux
  4. flake8: Tool to check the style and quality of Python code
  5. conntrack: command not found
  6. How to create partitions and file systems on DM-Multipath devices
  7. How to enable CUPS Debugging on CentOS/RHEL
  8. lvs Command Examples in Linux
  9. gnome-software: command not found
  10. calendar: Display upcoming events from a calendar file

You May Also Like

Primary Sidebar

Recent Posts

  • gml2gv Command Examples
  • glow Command Examples
  • glib-compile-resources Command Examples
  • glances Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright