Redhat7 modifies the default running level method -- RHEL7 uses systemd to create a symbolic link pointing to the default running level

Source: Internet
Author: User

Redhat7 modifies the default running level method -- RHEL7 uses systemd to create a symbolic link pointing to the default running level

Today, the official version of RHEL7 is installed, and the default running level is not modified in the familiar inittab. Open the inittab as follows:

[root@localhost init.d]# vi /etc/inittab # inittab is no longer used when using systemd.## ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.## Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target## systemd uses 'targets' instead of runlevels. By default, there are two main targets:## multi-user.target: analogous to runlevel 3# graphical.target: analogous to runlevel 5## To set a default target, run:## ln -sf /lib/systemd/system/<target name>.target /etc/systemd/system/default.target
No familiar id: 5: initdefault in the middle

RHEL7 uses systemd to create a symbolic link pointing to the default running level.

The modification method is as follows:
1. delete an existing Symbolic Link
----------------------------------------------------------------------------------
Rm/etc/systemd/system/default.tar get
----------------------------------------------------------------------------------
2. The default level is 3 (text mode)
----------------------------------------------------------------------------------
Ln-sf/lib/systemd/system/multi-user.target/etc/systemd/system/default.tar get
----------------------------------------------------------------------------------
Or the default level is 5 (graphic mode)
----------------------------------------------------------------------------------
Ln-sf/lib/systemd/system/graphical.tar get/etc/systemd/system/default.tar get
----------------------------------------------------------------------------------
3. Restart
----------------------------------------------------------------------------------
Reboot
----------------------------------------------------------------------------------

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.