Boot without X?
Boot without X?
Upgrading my existing Centos 6 box with centos 7 (testing in virtual machine of course). I want to know if it's possible to (after installing centos 7 with gui) make it boot without X or essentially turn it off but still have the ability to turn it back on whenever (reboot being required is fine). Is this possible?
I've bee reading online and many are saying that having a GUI on a server is pretty much unneeded and just uses more system resources. I am beginning to like this idea but I would prefer to have a GUI initially to set up the system, then once it's set up and configured I would like to disable X so that it will just run without a GUI.
I've bee reading online and many are saying that having a GUI on a server is pretty much unneeded and just uses more system resources. I am beginning to like this idea but I would prefer to have a GUI initially to set up the system, then once it's set up and configured I would like to disable X so that it will just run without a GUI.
Re: Boot without X?
Probably you want runlevel 3, except it's not called runlevel 3 any more.
Code: Select all
$ 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 /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
#
Re: Boot without X?
Soo, this isnt possible anymore or I need to do something different?
Re: Boot without X?
Oh, it is possible, in fact there's a command to do that for you:
See upstream vendor's documentation
Code: Select all
systemctl set-default multi-user.target
-
- Posts: 6
- Joined: 2013/03/12 08:47:15
Re: Boot without X?
From what I understand, CentOS 7 no longer uses /etc/inittab to configure runlevels, use this to change default runlevels:
http://www.server-world.info/en/note?os ... p=runlevel
http://www.server-world.info/en/note?os ... p=runlevel
- jenaniston
- Posts: 6
- Joined: 2014/07/15 12:07:22
Re: Boot without X?
man runlevel . . . "This is a legacy command available for compatibility only.bertan wrote:... you want runlevel 3, except it's not called runlevel 3 any more.
Code: Select all
$ cat /etc/inittab ... # To set a default target, run: # # ln -sf /lib/systemd/system/<target name>.target /etc/systemd/system/default.target #
It should not be used anymore, as the concept of runlevels is obsolete."
but command still gives same output
Code: Select all
# runlevel
N 5
# systemctl get-default
graphical.target
Code: Select all
# systemctl set-default multi-user.target
Code: Select all
rm '/etc/systemd/system/default.target'
ln -s '/usr/lib/systemd/system/multi-user.target' '/etc/systemd/system/default.target'
Centos 7 will then boot into runlevel 3 with that new default set.
Use
Code: Select all
# systemctl set-default graphical.target
I also noticed that this link says that systemd distinguishes between halt (as in # shutdown -h now) and poweroff ?
"so halt without parameters now does exactly what it says - it merely stops the system without turning it off."
https://fedoraproject.org/wiki/Systemd
Re: Boot without X?
Thanks guys for the extra information, I can't try this yet as I am still configuring the CO7 but hopefully it will work.jenaniston wrote:man runlevel . . . "This is a legacy command available for compatibility only.bertan wrote:... you want runlevel 3, except it's not called runlevel 3 any more.
Code: Select all
$ cat /etc/inittab ... # To set a default target, run: # # ln -sf /lib/systemd/system/<target name>.target /etc/systemd/system/default.target #
It should not be used anymore, as the concept of runlevels is obsolete."
but command still gives same outputSo, to reboot to runlevel 3Code: Select all
# runlevel N 5 # systemctl get-default graphical.target
which produces the output:Code: Select all
# systemctl set-default multi-user.target
and exits.Code: Select all
rm '/etc/systemd/system/default.target' ln -s '/usr/lib/systemd/system/multi-user.target' '/etc/systemd/system/default.target'
Centos 7 will then boot into runlevel 3 with that new default set.
Useto get back to boot into runlevel 5 again.Code: Select all
# systemctl set-default graphical.target
I also noticed that this link says that systemd distinguishes between halt (as in # shutdown -h now) and poweroff ?
"so halt without parameters now does exactly what it says - it merely stops the system without turning it off."
https://fedoraproject.org/wiki/Systemd
Re: Boot without X?
This kinda generic topic, like this one https://www.admon.org/faqs/disable-grap ... os7-rhel7/