LINUX服务
1.查看服务
#chkconfig --list
#chkconfig --list [services_name]
2.启用和关闭服务
#chkconfig [services-name] [off|on]
!此命令可以在所有运行级别关闭服务,重启生效。相当于windows的msconfig!
#chkconfig --level [number] [services-name] [off|on]
!此命令可以在单个运行级别关闭服务,重启生效。相当于windows的msconfig!
#service [name] [start|restart|stop|reload|status]
!此命令可立即关闭当前正在运行的服务!
example:
#service sshd status 查看SSH服务状态
#service sshd stop 关闭SSH服务
#netstat -tanl 查看SSH端口tcp22

浙公网安备 33010602011771号