service start-up configuration

We almost everyone know about the start-up configuration at operating system. The operating system starts the services from start-up configuration while the OS starts. At Linux the same thing happens.

To check whether a service is at start-up configuration we can use the following command

chkconfig –list sshd

This command will show the start-up configuration for the sshd service.

We can add any service at startup in many ways.

1. chkconfig sshd on

With this command the service will start only in that run level in which the OS is running now. Suppose the OS is running on run level 3, then this command add the sshd service at startup of run level 3.

2. chkconfig –level 35 sshd on

This command sets the sshd to start at run level 3 and 5.

3. We know that for every run level there are files. Suppose for run level 3 there is a file /etc/init.d/rc3.d .

Here we will find some files that starts their name with either K or S . Starting with K means the service is not at startup config. S means it will start automatically.

If the sshd service is not setup at run level 3, then we will find a file K20sshd . If we rename the file S20sshd, then sshd service will be set for run level 3.

mv K20sshd S20sshd

Wish to get any comments and better advice from you.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: