close

service command – list running services

The syntax is as follows for CentOS/RHEL 6.x and older (pre systemd):
service --status-all
service --status-all | more
service --status-all | grep ntpd
service --status-all | less

Print the status of any service

To print the status of apache (httpd) service:
service httpd status

List all known services (configured via SysV)

chkconfig --list

List service and their open ports

netstat -tulpn

Turn on / off service

ntsysv
chkconfig service off
chkconfig service on
chkconfig httpd off
chkconfig ntpd on

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 BENIT 的頭像
    BENIT

    BenIT

    BENIT 發表在 痞客邦 留言(0) 人氣()