RHEL Linux - Red Hat System Administration Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

Practice this question and more.


If you wanted to check the status of the ssh daemon, which command would you use?

  1. systemd status sshd.service

  2. systemd status sshd.daemon

  3. systemctl status sshd.daemon

  4. systemctl status sshd.service

The correct answer is: systemctl status sshd.service

To check the status of the SSH daemon, the command used is `systemctl status sshd.service`. This command leverages the systemctl utility, which is the command-line interface for controlling the systemd system and service manager. The term "service" in the command refers to the configuration of the daemon managed by systemd. The `systemctl` command is specifically designed for managing services and allows you to start, stop, restart, enable, and check the status of various services. By specifying `sshd.service`, you are directly querying the status of the SSH daemon, which is the correct unit name registered with systemd for the SSH service. Using "sshd.daemon" instead of "sshd.service" would not work as it is not the correct unit name used to refer to the SSH service. The distinction is important because systemd expects a specific naming convention for service units, which typically end with `.service`. Thus, choosing the correct name is critical for successfully checking the status of the service in question.