# systemctl list-units --type service UNIT LOAD ACTIVE SUB DESCRIPTION accounts-daemon.service loaded active running Accounts Service acpid.service loaded active running ACPI event daemon anacron.service loaded active running Run anacron jobs apache2.service loaded active running The Apache HTTP Server ...
# initctl list rc stop/waiting tty (/dev/tty3) start/running, process 1740 tty (/dev/tty2) start/running, process 1738 tty (/dev/tty1) start/running, process 1736 tty (/dev/tty6) start/running, process 1746 tty (/dev/tty5) start/running, process 1744 tty (/dev/tty4) start/run...
alias running_services='systemctl list-units --type=service --state=running' 保存文件中的更改并关闭它。从现在开始,使用“running_services”命令查看服务器上所有已加载、正在运行的服务的列表。 代码语言:javascript 复制 # running_services #use the Tab completion 此外,服务的一个重要方面是它们使用的端口。
xinetd (pid 485) is running... 运行以下命令以查看指定服务的状态: service --status-all | grep httpd httpd (pid 627) is running... 或者,使用以下命令也可以查看指定服务的状态: service httpd status httpd (pid 627) is running... 使用以下命令查看系统启动时哪些服务会被启用: chkconfig --list ...
systemctl list-unit-files 此命令将输出所有服务的状态。服务状态有启用enabled、禁用disabled、屏蔽masked(在取消屏蔽之前处于非活动状态)、静态static和已生成generated。 与grep 命令 结合,你可以仅显示正在运行的服务: 代码语言:javascript 复制 sudo systemctl|grep running ...
#ExampleUsage$screen#Startascreensession$screen-ls#Listrunningservices$screen-r#Attachtosession Ldapsearch 如果你经常使用LDAP数据库,那么Ldapsearch是必须的。该工具打开与LDAP服务器的连接,并允许你搜索、查找和调试数据库中的条目。 #ExampleUsage$ldapsearch-x-W-D<username|less#KeyFlags-x=simpleauthentication...
sudo service --status-all | grep "+" Replace the+symbol to list unknown or inactive units. Note that services with unknown status may also be included when you filter running or disabled services. You can determine the status of a specific service using its name: ...
如果要查看系统上所有的服务可以通过list-units以及list-unit-files查看。 格式为:systemctl [command] [--type=TYPE(|service|socket|target|等)] [--all] # 列出当前启动的服务 systemctl UNIT LOAD ACTIVE SUB DESCRIPTION proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Fo...
# systemctl list-units --type=service UNIT LOAD ACTIVE SUB DESCRIPTION acpid.service loaded active running ACPI Event Daemon ... mariadb.service loaded active running MariaDB database server ● postfix.service loaded failed failed Postfix Mail Transport Agent ...
[root@zutuanxue ~]# systemctl list-units --all | grep avahiavahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack avahi-daemon.socket loaded active running Avahi mDNS/DNS-SD Stack Activation Socket 可以看到这个服务的作用是为内网提供域名解析的 ...