Set CentOS7 to boot directly to the command line interface

Source: Internet
Author: User
To query the centsos settings online and directly go to the command line interface, you can modify the/etc/inittab file and set & ldquo;: id: 5: initdefault: & rdquo; in the file; change to & ldquo;: id: 3: initdefault: & rdquo; to change the default runlevel from 5 to 3, but the/etc/inittab page under CentOS7 is displayed as follows: to query the centsos settings online, go to the command line interface and change the ": id: 5: initdefault:" In the/etc/inittab file to ": id: 3: initdefault: ", the default runlevel is changed from 5 to 3, but the/etc/inittab page under CentOS7 is displayed as follows:
# 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 /etc/systemd/system/default.target#
 
Note that the inittab file is no longer used. now CentOS7 uses systemd as the new init system, while systemd uses "target" instead of "runlevel". by default, there are two main targets: multi-user.target: equivalent to runlevel 3rd command line interface, graphical.tar get: equivalent to runlevel 5 [Gui] set the default target, use the command: ln-sf/lib/systemd/system/ . Target/etc/systemd/system/default.tar get here I want to enable CentOS7 to enter the command line interface by default, then run the command:
# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

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.