Disable services in Linux to speed up System Operation

Source: Internet
Author: User
Disable the service in Linux to speed up system running-Linux Enterprise Application-Linux server application information. For more information, see the following. Linux reference.

To make the system run faster and smoother, some services are enabled by default.

However, if you do not use these services, these services will waste your valuable system resources. In this case, you can choose to disable or disable these services.

Disable unnecessary services:

Ntsysv then closes the service name corresponding to the entries listed below, or you can directly modify the service name according to the following instructions:

If no printer is available:

/Sbin/chkconfig -- level 235 cups off

If there is no LAN:

/Sbin/chkconfig -- level 235 smb off

If you do not need remote user logon:

/Sbin/chkconfig -- level 235 sshd off

If you do not need a scheduled task:

/Sbin/chkconfig -- level 235 crond off

If you do not need to add new hardware:

/Sbin/chkconfig -- level 235 kudzu off

TIPS:

Chkconfig

Function Description: Activate and stop services by using commands, and check and set various services of the system.

Syntax:

Chkconfig [-- add] [-- del] [-- list] [System Service]
Chkconfig [-- level] [System Service] [on/off/reset]

Related commands: ntsysv runlevel telinit

This command is a program developed by RedHat following the GPL rules. It can query which system services the operating system will execute in each runlevel, including various background programs.
Linux OS classifies the operating environment into the following seven levels:

0: boot (please do not switch to this level)
1: text interface in Single User Mode
2: multi-user text interface, does not have the Network File System (NFS) Function
3: multi-user text interface with Network File System (NFS)
4: some releases of linux use this level to enter x windows system
5: certain versions of linux use this level to enter x windows system
6. Restart

Parameters:

-- Add: adds the specified system service.
-- Del: deletes the specified system service.
-- List lists all system services and level codes that can be managed from the chkconfig command.
-- Level specifies the execution level in which the system service is enabled or disabled.
On/off/reset registers at the specified execution, enable/disable/reset the system service

Example:

1. view the status of various services in different execution levels:

$ Chkconfig -- list

2. List the startup status of the system service apmd at each execution level:

$ Chkconfig -- list apmd

3. Disable apmd system services when levels 2, 3, and 5 are executed:

$ Chkconfig -- level 235 apmd off

4. Enable the apmd system service when the execution level is 2, 3, and 5:

$ Chkconfig -- level 235 apmd on
Related Article

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.