zoukankan      html  css  js  c++  java
  • centos7版本设置OS启动默认进入图形界面还是文本界面

    相比7之前的版本,在centos7版本中,设置OS启动默认进入图形界面还是文本界面有了点变化

    检查当前默认设置

    [root@rems2 ~]# systemctl get-default
    graphical.target

    graphical.target表示开机将默认进入图形界面

    设置开机进入文本界面

    [root@rems2 ~]# systemctl set-default multi-user.target
    Removed symlink /etc/systemd/system/default.target.
    Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
    • 1
    • 2
    • 3

    反向设置命令类似[systemctl set-default graphical.target]

    阅读/etc/inittab,也可以发现如下内容

    [root@rems2 ~]# cat /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 /usr/lib/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 --->告诉我们multi-user.target相当于以前的runlevel 3
    # graphical.target: analogous to runlevel 5 --->告诉我们graphical.target相当于以前的runlevel 5
    #
    # To view current default target, run:
    # systemctl get-default
    #
    # To set a default target, run:
    # systemctl set-default TARGET.target
  • 相关阅读:
    WCF Server Console
    Restart IIS With Powershell
    RestartService (recursively)
    Copy Files
    Stopping and Starting Dependent Services
    多线程同步控制 ManualResetEvent AutoResetEvent MSDN
    DTD 简介
    Using Powershell to Copy Files to Remote Computers
    Starting and Stopping Services (IIS 6.0)
    java中的NAN和INFINITY
  • 原文地址:https://www.cnblogs.com/slqt/p/8979789.html
Copyright © 2011-2022 走看看