Linux view each service status and turn __linux on and off

Source: Internet
Author: User

1. ........ ....... ....... ....... ....... ...

Friendly display of the running status of all services:

Service--status-all

Chkconfig--list


2. ............. ......... ...

To view the running status of a single service

Such as

Service sshd Status

3. ............. ......... ...

View startup status, start automatically

Chkconfig--list ServiceName

0: Boot

1: Single user mode

2: Multiuser mode, does not have network Archive system (NFS) function

3: Multi-user mode, with Network Archive system (NFS) function

4: Some distributions Linux uses this level to enter the X Windows system

5: Same 4

6: Reboot

Note: Remember useless 1 and 6


To turn off or turn on service status:

Chkconfig--level 345 NSCD off/on


4. ............... ......... ...

Additional services:

Chkconfig--add XXX (Note: Service scripts must be stored in the/etc/init.d/directory)

such as Mysqld

[Root@www mysql-5.1.59] #cp support-files/mysql.server etc/init.d/mysqld


Chkconfig mysqld on (each level is on, each level is 2345 levels)


This will start in the form of a system service.


To delete a service:

Chkconfig--del XXX


RunLevel view the current level.


Note: The run level is the functional level at which the operating system is running.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.