你好,游客 登录 注册 搜索
背景:
阅读新闻

Redhat 7修改默认运行级别方法 --RHEL7使用systemd创建符号链接指向默认运行级别

[日期:2014-07-05] 来源:Linux社区  作者:wjx515628 [字体:大 中 小]

今天装了下正式版的RHEL7,发现熟悉的inittab中没有了修改默认运行级别,打开inittab如下

[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

中间没有了熟悉的 id:5:initdefault

 

RHEL7 使用systemd创建符号链接指向默认运行级别。

 

修改方法为:
1.首先删除已经存在的符号链接
----------------------------------------------------------------------------------
rm /etc/systemd/system/default.target
----------------------------------------------------------------------------------
2.默认级别转换为3(文本模式)
----------------------------------------------------------------------------------
ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
----------------------------------------------------------------------------------
或者默认级别转换为5(图形模式)
----------------------------------------------------------------------------------
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
----------------------------------------------------------------------------------
3.重启
----------------------------------------------------------------------------------
reboot
----------------------------------------------------------------------------------

Red Hat Enterprise Linux 7 现已提供用户下载 http://www.linuxidc.com/Linux/2014-06/102998.htm

RHEL 6.3 安装教程图文详解 http://www.linuxidc.com/Linux/2014-05/101845.htm

Red Hat Linux 7.0 安装图解 http://www.linuxidc.com/Linux/2014-06/103190.htm

更多RedHat相关信息见RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10

本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-07/104073.htm

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款