systemctl status firewall
时间: 2023-11-19 15:57:19 浏览: 71
可以使用以下命令来查看firewalld的状态:
```
systemctl status firewalld
```
该命令将显示firewalld服务的当前状态,包括是否正在运行以及最近的日志条目。如果firewalld正在运行,则输出应类似于以下内容:
```
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-08-10 14:20:00 EDT; 1h 5min ago
Docs: man:firewalld(1)
Main PID: 1234 (firewalld)
Tasks: 2 (limit: 4915)
Memory: 34.3M
CGroup: /system.slice/firewalld.service
└─1234 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Aug 10 14:20:00 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Aug 10 14:20:00 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
```
如果firewalld未运行,则输出将指示服务未运行。
阅读全文