inux设置开机服务自动启动/关闭自动启动命令 chkconfig

转载:

linux设置开机服务自动启动/关闭自动启动命令 chkconfig - CSDN博客
https://blog.csdn.net/jiangguilong2000/article/details/8259360

chkconfig --list :显示所有运行级系统服务的运行状态信息(on或off)。如果指定了name,那么只显示指定的服务在不同运行级的状态。
>> chkconfig --list 
>>chkconfig --list smb 
chkconfig --add name:增加一项新的服务。但默认所有级别都关闭状态
>>chkconfig --add smb
chkconfig [--level levels] name <on|off|reset>:设置某一服务在指定的运行级是被启动,停止还是重置。例如,要在3,4,5运行级停止smb服务,则命令如下:
>>chkconfig --level 2345 smb on 
表示 2,3,4,5 级别为启动
>>chkconfig --level 2345 smb off  
表示2,3,4,5 级别为关闭
chkconfig --del name:删除服务
>>chkconfig --del smb 
表示删除smb的服务,当然,肯定是关闭了

猜你喜欢

转载自www.cnblogs.com/twpone/p/9302514.html