chkconfig用法對sshd各種服務應用介紹
在當前大多數Linux發行版中可能都會包含這兩個命令,chkconfig用法為我們控制Linux中的服務(守護進程)提供了很大的方便,先看看這兩條命令的幫助:
[root@localhost ~]# service --help
Usage: service < option > | --status-all | [ service_name [ command | --full-restart ] ]
[root@localhost ~]# chkconfig --help
chkconfig 版本 1.3.29 - 版權 (C) 1997-2000 Red Hat, Inc.
在 GNU 公共許可的條件下,本軟件可以被自由發行。
chkconfig用法: chkconfig --list [name]
chkconfig --add
chkconfig --del
chkconfig [--level ] <on|off|reset|resetpriorities>
在我的系統上sshd默認不在系統服務列表里邊,下面以sshd命令說明他們的用法:
輸入service sshd會列出可用的一些操作:
[root@localhost ~]# service sshd
用法:/etc/init.d/sshd {start|stop|restart|reload|condrestart|status}
啟動sshd服務:
service sshd start
停止sshd服務:
service sshd stop
將sshd添加到服務列表里邊:
chkconfig --add sshd
使sshd可以開機自動運行:
chkconfig sshd on
還可以通過--level具體指定sshd的運行級別。
【編輯推薦】