启动

来自Ubuntu中文
Qiii2006留言 | 贡献2010年8月1日 (日) 18:11的版本 →‎init
跳到导航跳到搜索

init

runlevel

查看当前的运行等级,Ubuntu 桌面默认是2。

runlevel

/etc/rc2.d

update-rc.d

添加启动项,例如mysql

qii@ubuntu:/etc/rc2.d$ sudo update-rc.d mysql defaults 
update-rc.d: warning: /etc/init.d/mysql missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 Adding system startup for /etc/init.d/mysql ...
   /etc/rc0.d/K20mysql -> ../init.d/mysql
   /etc/rc1.d/K20mysql -> ../init.d/mysql
   /etc/rc6.d/K20mysql -> ../init.d/mysql
   /etc/rc2.d/S20mysql -> ../init.d/mysql
   /etc/rc3.d/S20mysql -> ../init.d/mysql
   /etc/rc4.d/S20mysql -> ../init.d/mysql
   /etc/rc5.d/S20mysql -> ../init.d/mysql

删除启动项

qii@ubuntu:/etc/rc2.d$ sudo update-rc.d -f mysql remove 
 Removing any system startup links for /etc/init.d/mysql ...
   /etc/rc0.d/K20mysql
   /etc/rc1.d/K20mysql
   /etc/rc2.d/S20mysql
   /etc/rc3.d/S20mysql
   /etc/rc4.d/S20mysql
   /etc/rc5.d/S20mysql
   /etc/rc6.d/K20mysql

rcconf

sudo apt-get install rcconf
sudo rcconf