• 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

rc-status Command Examples in Linux

by Deepika

In OpenRC, runlevels are used to define the state of the system and the services that should be running at any given time. rc-status is a command-line tool that provides information about the current state of the system and the services running in each runlevel.

When run without any arguments, rc-status displays a summary of the current system state. This includes the current runlevel, the services that are running, and the services that are scheduled to start or stop.

rc-status also allows you to specify one or more runlevels as arguments. For example, rc-status default will display information about the default runlevel, while rc-status boot local will display information about the boot and local runlevels.

In addition to displaying information about the current system state, rc-status can also be used to check the status of individual services. You can use the -a option to display information about all services, or you can specify one or more service names as arguments. For example, rc-status sshd will display information about the sshd service.

One of the useful features of rc-status is its ability to display service dependencies. When run with the -d option, rc-status will display a tree diagram showing the dependencies between services. This can be useful for troubleshooting startup problems or understanding how different services are related to one another.

Overall, rc-status is a powerful tool for managing and troubleshooting OpenRC services, and it can provide valuable insights into the state of your system and the services running on it.

rc-status Command Examples

1. Show a summary of services and their status:

# rc-status

2. Include services in all runlevels in the summary:

# rc-status --all

3. List services that have crashed:

# rc-status --crashed

4. List manually started services:

# rc-status --manual

5. List supervised services:

# rc-status --supervised

6. Get the current runlevel:

# rc-status --runlevel

7. List all runlevels:

# rc-status --list

Filed Under: Linux

Some more articles you might also be interested in …

  1. bspc Command Examples in Linux
  2. lsns: command not found
  3. “aws sqs” Command Examples
  4. How to install zip/unzip package in Linux CentOS/RHEL 7 and 8
  5. etcd: A distributed, reliable key-value store for the most critical data of a distributed system
  6. “Abort command issued nexus” error messages in /var/log/messages file
  7. How to analyze basic system performance using – vmstat, sar, iostat and mpstat
  8. virt-manager Command Examples in Linux
  9. CentOS / RHEL 7 : How to create an Network Bonding (NIC teaming) using nmcli
  10. colrm : command not found

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright