Ubuntu安装sysv-rc-conf实现开机自动启动

一般情况下,我们可能比较熟悉chkconfig,可以设置开机自动启动。但是在Ubuntu系统中并不支持chkconfig安装,即便我们在安装的时候也会提示"E: Package { O & |'chkconfig' has no in- Z 6 : 9 b m ) jstallation candidate"的错S f 0 I / p ` X 6误。然后云计算v Y k B r优惠查阅资料发现在Ubuntu中并不是使用的chkconfig,而是用sysv-rc-conf

第一、安装sysv-rc-conf

apt-get install sysv-rc-conf -yK B n F 1 t (

第二、检查开机启动

sysv-rc-conf

输入命令,然后可以看到:

如果我们移动光标,需要关闭程序则'-'并确认,开启则'+y Z r : | F o'或'+'并确认。我们看到括号中的x则表示开启,例如上图中的Sendmail服务在Runlevel 2、3、4、5,均为开机自启动。