How do I install chkconfig on Ubuntu?

前端 未结 7 1636
孤城傲影
孤城傲影 2021-01-30 09:22

I am running Ubuntu 13.10, and I\'m pretty new to Linux. I tried:

$ sudo apt-get install chkconfig

Package chkconfig is not ava

7条回答
  •  再見小時候
    2021-01-30 09:48

    In Ubuntu /etc/init.d has been replaced by /usr/lib/systemd. Scripts can still be started and stoped by 'service'. But the primary command is now 'systemctl'. The chkconfig command was left behind, and now you do this with systemctl.

    So instead of:

    chkconfig enable apache2
    

    You should look for the service name, and then enable it

    systemctl status apache2
    systemctl enable apache2.service
    

    Systemd has become more friendly about figuring out if you have a systemd script, or an /etc/init.d script, and doing the right thing.

提交回复
热议问题