In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What are the relevant commands of Ubuntu service management? in order to solve this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Ubuntu service management has a lot of commands that we need to master, and so many commands have a lot to learn. Redhat provides the command chkconfig to manage the service on / off of the system at different runlevels: chkconfig ServiceName on/off and you can use chkconfig-- list (two bars) to view the current status.
There is no such command in Ubuntu service management. In fact, you can simply manage the system service without any command. You can manage the service by changing the startup script name under / etc/rc*.d (the value of * is from 0 to 6 and S). For example, if you don't want KDM to start automatically, you can do this: sudo find / etc/rc*-name * kdm*-exec rm {}\; that is, delete all KDM startup scripts.
Ubuntu service management also provides another simple command to implement management. But first, the service must already exist in the / etc/init.d directory. Such as:
Add a service: sudo update-rc.d ServiceName defaults
Delete a service: sudo update-rc.d ServiceName remove
You can also install another powerful tool: sudo apt-get install sysv-rc-conf sysvconfig
Startup: sudo sysv-rc-conf allows you to configure the startup of each service at all levels.
If you want to start a service at any time, you can do this: sudo / etc/init.d/ServiceName start
For example, if I want to log in remotely, I need to use the ssh service: sudo / etcinit.d/ssh start (other systems may be sshd)
There are other actions that can be done in Ubuntu service management:
Start: start the service stop: stop the service restart: shut down the service, then restart reload: reread the configuration file without restarting the server status: provide the current status of the service condrestart: if the service is locked, this shuts down the service, and then starts again.
Again, the meaning of the linux runlevel: there are usually several runlevel: runlevel system state 0 halt the system 1 single user mode 2 basic multi user mode 3 multi user mode 5 multi user mode with gui 6 reboot the system S single user mode runlevel command to see the current runlevel. The init command changes the current runlevel.
This is the answer to the question about the command of Ubuntu service management. I hope the above content can be of some help to you. If you still have a lot of doubts, you can follow the industry information channel to learn more about it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.