租用问题

质量为本、客户为根、勇于拼搏、务实创新

< 返回租用问题列表

centos7怎么查看正在运行的服务,centos7怎么查看主机名

发布时间:2023-09-18 08:51:57

centos7怎样查看正在运行的服务

在CentOS 7上,可使用以下命令来查看正在运行的服务:
1. 使用 `systemctl` 命令来列出所有已启动的服务:
```
sudo systemctl list-units --type=service --state=running
```
2. 使用 `systemctl` 命令来列出正在运行的服务及其状态:
```
sudo systemctl --type=service --state=running
```
3. 使用 `service` 命令来列出正在运行的服务:
```
sudo service --status-all | grep running
```
以上命令将显示正在运行的服务和其状态。