Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to view and disable Linux system services

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to view and shut down Linux system services". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The essence of the server is to provide access to various services. Make the server run only the required services and shut down the unused services. Doing so not only frees up some system resources, but also makes the server more secure. For example, if you're just running a simple server, you obviously don't need an X-ray display or desktop environment. If you do not need the Windows network sharing feature, you can safely turn off Samba.

Use the following command to view the services that are started with system startup:

The code is as follows:

Chkconfig-- list | grep "3:on"

If the system is running systemd, execute this command:

The code is as follows:

Systemctl list-unit-files-- type=service | grep enabled

Then use the following command to shut down the service:

The code is as follows:

Chkconfig service off

Or

The code is as follows:

Systemctl disable service

In the above example, replace "service" with the name of the service you really want to stop. Examples are as follows:

The code is as follows:

Chkconfig httpd off

Or

The code is as follows:

Systemctl disable httpd

This is the end of "how to View and disable Linux system Services". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report