CentOS7 change target (running level)

Source: Internet
Author: User
1. use the command to switch to the running level/target systemctlisolatemultiuser.tar get // restart get // to the running level 3. this command has no effect on the next startup and is equivalent to teli.

1. use commands to switch the running level/target

# Systemctl isolate multi-user.target // switch to run Level 3, this command has no effect on the next start, equivalent to telinit 3

# Systemctl isolate runlevel3.target // switch to runtime level 3. this command has no effect on the next startup and is equivalent to telinit 3.

# Systemctl isolate graphical.tar get // switch to runtime level 5. this command has no effect on the next startup and is equivalent to telinit 5

# Systemctl isolate runlevel5.target // switch to runtime level 5. this command has no effect on the next startup and is equivalent to telinit 5.

2. modify the default running level/target

You can run the following command to set the text or graphic mode to be enabled by default.

# Ln-sf/lib/systemd/system/multi-user.target/etc/systemd/system/default.tar get // text mode

# Ln-sf/lib/systemd/system/graphical.tar get/etc/systemd/system/default.tar get // graphic mode

When the machine is started, the target is default.target, which links to graphical.tar get (roughly equivalent to the original running level 5 ). You can change the default running level through kernel parameters (see Chapter 1st ).

You can also run the systemctl command to set the text or graphic mode to be enabled by default at startup.

# Systemctl-f enable multi-user.target // text mode

# Systemctl-f enable graphical.tar get // graphic mode

 

Related Article

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.