Change RunLevel in RHEL 7

The RHEL 7 / CentOS 7 comes with systemd (System Management Daemon) which is a init system uses target instade of Runlevel Numbers but the concept is same.

To List all active units/services just run the below command.

# systemctl list-units

Or you can filter the unit list to find targets by using the below command.

# systemctl list-units --type=target

To check currently system is running in which Runlevel by using below command.

# systemctl get-default

Here currently I am in Graphical User Interface (GUI) or Runlevel No. 5. Also you can use the below command to check the current Runlevel.

# runlevel

To Switch the Runlevel to Text mode use the below command.

# systemctl set-default multi-user.target

If you want to switch to GUI from Text Mode you can use the below command.

# systemctl set-default graphical.target

Source : http://www.elinuxbook.com/change-runlevel-in-rhel-7-centos-7-with-systemd-using-systemctl/


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章