CentOS7修改系统启动模式

栏目: 服务器 · 发布时间: 6年前

内容简介:在CentOS Linux上我们通常都是修改 /etc/inittab 文件,在其中加入 “id::initdefault:” 来设置系统启动模式,但是在 CentOS7 上发现这个文件似乎是没用了,修改后重启机器并不会启动机器到设置的模式。于是乎,仔细看了一下 /etc/inittab 文件中的注释,发现现在是使用 “systemctl get-default” 和 “systemctl set-default TARGET.target” 来查看和设置启动模式了。使用方法如下:

在CentOS Linux上我们通常都是修改 /etc/inittab 文件,在其中加入 “id::initdefault:” 来设置系统启动模式,但是在 CentOS7 上发现这个文件似乎是没用了,修改后重启机器并不会启动机器到设置的模式。

于是乎,仔细看了一下 /etc/inittab 文件中的注释,发现现在是使用 “systemctl get-default” 和 “systemctl set-default TARGET.target” 来查看和设置启动模式了。

使用方法如下:

$ sudo systemctl get-default
graphical.target

sudo 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.

$ sudo systemctl get-default
multi-user.target

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

The Book of CSS3

The Book of CSS3

Peter Gasston / No Starch Press / 2011-5-13 / USD 34.95

CSS3 is the technology behind most of the eye-catching visuals on the Web today, but the official documentation can be dry and hard to follow. Luckily, The Book of CSS3 distills the heady technical la......一起来看看 《The Book of CSS3》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具