
可以在Linux下输入命令:
1、$service sshd status
2、#service servicename status是当前状态
3、#chkconfig --list servicename是查看启动状态,也就是是否开机自动启动
注:
1、如果service和chkconfig 找不到,可以试试/sbin/service和/sbin/chkconfig
2、如果用ubuntu好像是要用/etc/init.d/servicename status查看当前状态
(servicename就是你要查的服务名)
扩展资料:查看某项服务当前启动状态的其他方式
一、利用进程来查看
命令里 ps -aux | grep xxx 是查看某个进程或者服务是否存在。
二、利用services命令
1、查看单个服务的运行状态: service 服务名 status
如:[root@localhost ~]# service sshd status
openssh-daemon (pid 3701) 正在运行?
2、查看所有服务的运行状态: service _status -all
psaux命令。ps命令用于获取有关在Linux,Unix和BSD系统上运行的进程的详细信息。ps有一些流行的选项和用例,其中一个是aux选项。
ps命令的默认行为是仅列出当前用户进程。
psaux命令的缺陷在于只能显示时间到年、日期、或者时间,无法具体到年月日时分秒。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)