Linux chkconfig Command Tutorial with Examples

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-chkconfig-command-tutorial-examples/
PINTEREST
PINTEREST
INSTAGRAM

Linux services and daemons can be controlled with chkconfig command. chkconfig command is mainly used to set given service or daemon run level. In order to work with chkconfig command we need root privileges. systemctl command suite provides more and detailed features. Related tutorial can be accessed from following link.

Linux Systemctl Tutorial

List All Existing Service and Daemons

We can use chkconfig command in order to list all installed services and daemons like below. We will use  --list as option.

List Specific Service and Daemon

We can also list only specific service without listing all of them. There is two way for this first way is providing the service name with the --list option. In this example we will list service named sshd

Second way is listing all services and daemons but filtering them with grep command. We will provide the service name to the grep command like below.

Enable Service

We can use chkconfig command also enable services. Enabling services will make them to start automatically if specified run level activated. In this example we will enable sshd service for run levels 2, 3, 4, 5 . We need root privileged for this command. We will use onkeyword after the service name.

Disable Service

We can also disable services and daemons for given run level. We will provide the offkeyword after the service name which is very similar to service enable. In this example we will disable the sshd service for service level 2 .

LEARN MORE  How To Use Psexec Tools To Run Commands and Get Shell Remote Windows Systems

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-chkconfig-command-tutorial-examples/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)