1 Try sudo/su root
sudo chkconfig --list
2 The above method does not work, please check whether chkconfig
rpm -qa |grep chkconfig
The chkconfig command is not supported by default on ubuntu, the installation package address:
http://download.csdn.net /detail/hylongsuny/5276536
3chkconfig The command
chkconfig can check and set the service to start automatically.
#chkconfig --list
outputs a list of all services.
If the service you want to start is not in the list, you
can use
#chkconfig --add to add it:
#chkconfig --add postfix
Deletion is naturally
#chkconfig --del added:
#chkconfig --del postfix
--list You can add the service name to output only the information of this service.
For example
#chkconfig --list httpd
httpd 0:off 1:off 2:off 3 :off 4:off 5:off 6:off
When the above outputs 0-6 are all off, it means that there is no automatic startup.
0-6 respectively means
Level 0 means: Indicates shutdown
Level 1 means: Single-user mode
Level 2 means: Multi-user command line mode without network connection
Level 3 means: Multi-user command line mode with network connection
Level 4 means: Unavailable
Level 5 means: With The multi-user mode level 6 of the graphical interface
means: restart
#chkconfig httpd on
to set the httpd service to start automatically. Check
again
#chkconfig --list httpd
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
At this time, 2~5 are all on, and the setting is successful.
On the contrary,
#chkconfig httpd off is to turn off automatic startup.
Finally , there is a --level, which should be set separately for some levels of 0-6.
#chkconfig --level 35 httpd on Set 3 and 5 to on
sudo chkconfig --list
2 The above method does not work, please check whether chkconfig
rpm -qa |grep chkconfig
The chkconfig command is not supported by default on ubuntu, the installation package address:
http://download.csdn.net /detail/hylongsuny/5276536
3chkconfig The command
chkconfig can check and set the service to start automatically.
#chkconfig --list
outputs a list of all services.
If the service you want to start is not in the list, you
can use
#chkconfig --add to add it:
#chkconfig --add postfix
Deletion is naturally
#chkconfig --del added:
#chkconfig --del postfix
--list You can add the service name to output only the information of this service.
For example
#chkconfig --list httpd
httpd 0:off 1:off 2:off 3 :off 4:off 5:off 6:off
When the above outputs 0-6 are all off, it means that there is no automatic startup.
0-6 respectively means
Level 0 means: Indicates shutdown
Level 1 means: Single-user mode
Level 2 means: Multi-user command line mode without network connection
Level 3 means: Multi-user command line mode with network connection
Level 4 means: Unavailable
Level 5 means: With The multi-user mode level 6 of the graphical interface
means: restart
#chkconfig httpd on
to set the httpd service to start automatically. Check
again
#chkconfig --list httpd
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
At this time, 2~5 are all on, and the setting is successful.
On the contrary,
#chkconfig httpd off is to turn off automatic startup.
Finally , there is a --level, which should be set separately for some levels of 0-6.
#chkconfig --level 35 httpd on Set 3 and 5 to on