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

What is the linux restart service command?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces what the linux restart service command is, the article is very detailed, has a certain reference value, interested friends must read it!

Linux restart service command

Restart:

Service service name restart

Or

Systemctl restart service name

Service and systemctl

1.service command

The service command actually goes to the / etc/init.d directory to execute the relevant program.

# service command to start redis script service redis start# directly start redis script / etc/init.d/redis start# boot self-startup update-rc.d redis defaults

The script needs to be written by ourselves.

2.systemctl command

Systemd is the latest initialization system (init) of the Linux system. Its function is to improve the startup speed of the system, start as few processes as possible, and start as many processes concurrently as possible. The corresponding process management command for systemd is systemctl

1) the systemctl command is compatible with service

That is, systemctl will also go to the / etc/init.d directory to check and execute related programs.

Systemctl redis startsystemctl redis stop# Boot self-starting systemctl enable redis

2) the systemctl command manages the resource Unit of systemd

The Unit of systemd is placed in the directory / usr/lib/systemd/system (Centos) or / etc/systemd/system (Ubuntu), and there are four main types of files: .mount, .service, .target, and .upload.

The above is all the contents of what the linux restart service command is, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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