📅  最后修改于: 2023-12-03 14:47:50.080000             🧑  作者: Mango
In this guide, we will explore how to use the systemd
command to show SSHD services on a Linux system. systemd
is a system and service manager that is commonly used on modern Linux distributions. By using systemd
, you can manage and control various aspects of the system, including services like SSHD.
Before proceeding with this guide, ensure that you have the following:
Follow the steps below to use the systemd
command to show SSHD services:
Open a terminal or shell on your Linux system.
Run the following command to list all services on your system:
systemctl list-unit-files --type=service
Scroll through the output to locate the SSHD service. It is usually named sshd.service
.
To view detailed information about the SSHD service, including its status and related units, run the following command:
systemctl show sshd.service
The following markdown code snippet shows how to format the command and its output in a markdown file:
To list all services on your system, use the following command:
systemctl list-unit-files --type=service
To view detailed information about the SSHD service, use the following command:
systemctl show sshd.service
The output will display various properties of the SSHD service.
For example:
Type=simple
Restart=always
NotifyAccess=none
RestartUSec=1s 238ms
ExecStartPre=-/usr/sbin/sshd -t
ExecStart=/usr/sbin/sshd -D
…
(Note: Replace the bash
language identifier with the appropriate language identifier based on your markdown file's syntax highlighting support.)
### Conclusion
By following the steps outlined in this guide, you should now be able to use the `systemd` command to show SSHD services on your Linux system. This information can be helpful for system administration tasks or troubleshooting SSH-related issues.