Linux view each service status and turn 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 health status of a single service

Such as

Service sshd Status

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

Check the boot status, boot automatically

Chkconfig--list ServiceName

0: Boot

1: Single-user mode

2: Multi-user mode, no Network File system (NFS) function

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

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

5: Same 4

6: Restart

Note: Remember that 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

[[email protected] MySQL-5.1.59] #cp support-files/mysql.server etc/init.d/mysqld

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

This will start in the form of a system service.

To delete a service:

Chkconfig--del XXX

RunLevel view the current level.

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

Linux view each service status and turn on and off

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.