The command to switch from the command line level to the window level has not changed: init 5 or startx
The command to switch from window level to command line level has not changed: init 3
The new version of the runlevel is defined under /lib/systemd/system:
[root@localhost ~]# ls -ltr /lib/systemd/system/runlevel*.target
lrwxrwxrwx. 1 root root 16 September 10 20:58 /lib/systemd/system/default.target -> graphical.target
lrwxrwxrwx. 1 root root 13 September 10 20:58 /Lib/systemd/system/runlevel1.target -> rescue.target
lrwxrwxrwx. 1 root root 15 September 10 20:58 /lib/systemd/system/runlevel0.target -> poweroff.target< Br>
lrwxrwxrwx. 1 root root 17 September 10 20:58 /lib/systemd/system/runlevel4.target -> multi-user.target
lrwxrwxrwx. 1 root root 17 September 10 20:58 /lib/systemd/system/runlevel3.target -> multi-user.target
lrwxrwxrwx. 1 root Root 17 September 10 20:58 /lib/systemd/system/runlevel2.target -> multi-user.target
lrwxrwxrwx. 1 root root 16 September 10 20:58 /lib/systemd/system /runlevel5.target -> graphical.target
lrwxrwxrwx. 1 root root 13 September 10 20:58 /lib/systemd/system/runlevel6.target -> reboot.target
You can set different run levels for different needs:
If you set the command line level (init 3) method:
[root@localhost ~]# ln -svf /lib/systemd/system/Runlevel3.target /etc/systemd/system/default.target
or
[root@localhost ~]# ln -svf /lib/systemd/system/multi-user.target /etc /systemd/system/default.target
or
[root@localhost ~]#systemctl set-default multi-user.target
Set window level (init 5) Method:
[root@localhost ~]# ln -svf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
or
[root@localhost ~]# ln -svf /lib/systemd/system/gr Aphical.target /etc/systemd/system/default.target
or
[root@localhost ~]#systemctl set-default graphical.target
---- -------------------------Dividing line----------------------- ------
Modify the system runlevel:
1. Systemd uses a more free target instead of sysvinit's runlevel. The third run level is replaced with multi-user.target. The fifth run level is replaced by graphical.target. Runlevel3.target and runlevel5.target are symbolic links to multi-user.target and graphical.target, respectively.
You can use the following command to switch to “run level 3 ”:
systemctl isolate multi-user.target or systemctl isolate runlevel3.target
Command switch to “Runlevel 5 ”:
systemctl isolate graphical.target or systemctl isolate runlevel5.target
2. How to change the default runlevel?
systemd Link to point to the default run level. Before creating a new link, you can delete the existing link by the following command: rm /etc/systemd/system/default.target
Default boot runlevel 3 :
ln -sf /lib /systemd/system/multi-user.target /etc/systemd/system/default.target
The default startup runlevel is 5:
ln -sf /lib/systemd/system/graphical. Target/etc/systemd/system/default.target
systemd does not use the /etc/inittab file.
-----------------------------Segmentation line ------------- ----------------
How do I view the current runlevel?
The old runlevel command can still be used under systemd. You can continue to use it, although systemd replaces the runlevel of the previous system with the ‘target’ concept (multiple ‘target’ can be activated at the same time).
The equivalent systemd command is systemctl list-units –type=target
There are five basic ways to dissipate a blade server. Once one of these methods is selected
Reducing keyboard input can greatly improve the productivity of programmers. The use of sho
Hyper-V Replica resynchronization This topic raises peoples attention, the first question you might
Today, I still need to use a super good chassis to assemble a large-capacity server —
Deploying DHCP Common Mistakes
Linux FTP server security completely Raiders
Three methods for configuring IP address of CentOS 6.5 under virtual machine
Windows Server Administrator PowerShell Getting Started
Analyze the pros and cons of running VMware Server on Win and Linux
802.11n WLAN infrastructure strategy: 2.4 vs. 5 GHz bandwidth battle
Must understand the server five problems
Simply set up asp server in XP
Cleverly solve the problem of digital key failure on the right side of the computer keyboard
Is there a problem with WinXP sharing and access? Experts easily solve
Win8 adjusts the display refresh rate to solve the phenomenon of image jitter
Cancel win7 system dual hard disk auto-off function
WeChat 6.0 small video off automatic playback method
Windowsazure often problems and solutions (1)
Win10 right click menu is too wide? The
Win10 9926 installation app store application prompt error 0x800706d9 how to do?
Win10 first anniversary update official version MSDN official original ISO image download