In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to change the running level of Centos8". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to change the running level of Centos8".
On Linux systems, the current operating state of the operating system is called the run level; it defines the system services that are running. Systems before Centos6 use SysV init, and the run level is identified digitally. However, in systemd, the run level is called targets.
In this article, you will explain how to use systemd to change the run level (targets). Before proceeding, let's briefly describe the relationship between runlevel numbers and targets:
Level0 matches poweroff.target, (runlevel0.target is a symbolic link to poweroff.target). Level1 matches rescue.target, (runlevel1.target is a symbolic link to rescue.target). Level3 is matched by multi-user.target, (runlevel3.target is a symbolic link to multi-user.target). Level5 is matched by graphic.target, (runlevel5.target is a symbolic link to graphic.target). Level6 is matched by reboot.target (while runlevel6.target is a symbolic link to reboot.target). Emergency matches emergency.target. How to view the current targets (run level) in Systemd
When the system boots, systemd activates the default.target unit by default. Its main job is to activate services and other units through dependencies. To view the default destination, enter the following command:
[root@localhost ~] # systemctl get-defaultmulti-user.target
How to set the default targets (run level) in Systemd
To set the default destination, run the following command.
[root@localhost] # systemctl set-default graphical.targetRemoved / etc/systemd/system/default.target.Created symlink / etc/systemd/system/default.target → / usr/lib/systemd/system/graphical.target. Switch targets (runlevel) while the system is running
While the system is running, the targets (runlevel) can be switched, which means that only services and units defined under that target will run on the system.
To switch to runlevel 5 (graphical.target), run the following command, provided the graphical interface is installed.
[root@localhost ~] # systemctl isolate runlevel5.target or [root@localhost ~] # systemctl isolate graphical.target
After executing the command, you will immediately enter the graphical interface.
At this point, I believe you have a deeper understanding of "how to change the run level of Centos8". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.