Linux服务是Linux系统非常重要的一环,查看服务,需要用到chkconfig工具,然而在Ubuntu 12.0版本,却没有查找到此命令。
查询stackOverflow获取了正确答案,对于Ubuntu 12.0版本可以用sysv-rc-conf命令来代替,安装命令如下:
sudo apt-get install sysv-rc-conf
安装完成后,默认安装在/usr/sbin目录下。
切换到该目录,直接用普通用户运行,会报权限错误,切换到root用户,运行即可查看所有的服务:
root@ubuntu:/usr/sbin# ./sysv-rc-conf --listacpid 2:on 3:on 4:on 5:onalsa-utils 0:off 1:off 6:off S:onanacron 2:on 3:on 4:on 5:onapparmor S:onapport 2:on 3:on 4:on 5:onavahi-daemon 0:off 1:off 2:on 3:on 4:on 5:on 6:offbluetooth 0:off 1:off 2:on 3:on 4:on 5:on 6:offbrltty S:onconsole-setu S:oncron 2:on 3:on 4:on 5:oncups 1:off 2:on 3:on 4:on 5:oncups-browsed 0:off 1:off 2:on 3:on 4:on 5:on 6:offdbus 2:on 3:on 4:on 5:ondns-clean S:ongrub-common 2:on 3:on 4:on 5:onhalt 0:offirqbalance 0:off 1:off 2:on 3:on 4:on 5:on 6:offkerneloops 0:off 1:off 2:on 3:on 4:on 5:on 6:offkeyboard-set S:onkillprocs 1:onkmod S:onlightdm 0:off 1:off 2:on 3:on 4:on 5:on 6:offmysql 0:off 1:off 2:on 3:on 4:on 5:on 6:offnetwork-mananetworking 0:off 6:off S:onondemand 2:on 3:on 4:on 5:onopen-vm-tool 0:off 1:off 2:on 3:on 4:on 5:on 6:offplymouth 0:off 2:on 3:on 4:on 5:on 6:offplymouth-log S:onpppd-dns S:onprocps S:onrc.local 2:on 3:on 4:on 5:on S:onreboot 6:offresolvconf 0:off 6:off S:onrsync 2:on 3:on 4:on 5:onrsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:offsaned 1:off 2:on 3:on 4:on 5:onsendsigs 0:off 6:offsingle 1:onspeech-dispa 0:off 1:off 2:on 3:on 4:on 5:on 6:offssh 2:on 3:on 4:on 5:onthermald 0:off 1:off 2:on 3:on 4:on 5:on 6:offudev S:onufw 1:off S:onumountfs 0:off 6:offumountroot 0:off 6:offunattended-u 0:off 6:offurandom 0:off 6:off S:onuuidd 0:off 1:off 2:on 3:on 4:on 5:on 6:offwhoopsie 1:off 2:on 3:on 4:on 5:onx11-common S:onroot@ubuntu:/usr/sbin#
转载于:https://www.cnblogs.com/lzp666/p/7067365.html