- How to boot a Linux system without graphical server
- 5 Answers 5
- Leonieclaire.com
- How do I turn off graphical mode in Linux?
- How do I switch to GUI mode in Ubuntu?
- How do I start GUI mode in Linux?
- How do I disable Gnome Display Manager?
- Is there a way to disable the GUI in Ubuntu?
- Why is there no GUI in Ubuntu Server?
- How to boot Debian into text mode without using GUI?
- 6 Answers 6
- At the boot prompt
- Fake display manager
- Through runlevels
How to boot a Linux system without graphical server
rather than a permanent change on the system (the standard behaviour should be to boot with the default graphical interface).
As requested, I’m adding the relevant content of /boot/grub2/grub.cgf
menuentry 'openSUSE 13.2' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-179689d2-d2f3-4ec8-9cc3-01ec946c6b11' < load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos5' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 179689d2-d2f3-4ec8-9cc3-01ec946c6b11 else search --no-floppy --fs-uuid --set=root 179689d2-d2f3-4ec8-9cc3-01ec946c6b11 fi echo 'Loading Linux 3.16.7-24-desktop . ' linux /boot/vmlinuz-3.16.7-24-desktop root=UUID=179689d2-d2f3-4ec8-9cc3-01ec946c6b11 quiet quiet liveinstall lang=it_IT resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-00A0RT0_WD-WXL1AC0U9725-part7 splash=silent quiet showopts vga=803 echo 'Loading initial ramdisk . ' initrd /boot/initrd-3.16.7-24-desktop >
No, the graphical interface starts as usual. I also tried to replicate your first suggestion by simplifying the linux line to linux /boot/vmlinuz-3.16.7-24-desktop root=UUID=179689d2-d2f3-4ec8-9cc3-01ec946c6b11 ro quiet text , whitout any success.
So, you’re hitting E to edit the menu entry on the grub boot screen and then F10 to boot and it still goes to GUI?
Yes, exactly. I have even tried this on a virtual machine (still with openSUSE) but without any success. As soon as possible I’ll try also with another distro.
5 Answers 5
What you are asking for is not completely clear to me, so I will give you several possible answers, hoping you can find the one you are interested in.
- You can disable the X server at the next boot by going to /etc/default/grub , finding the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT="text"
You can do the vice versa to re-enable the X server.
- You can disable your Window Manager: assuming you are using systemd , which most Linux distros do nowadays,
menuentry 'Ubuntu (Text mode)' --class ubuntu < recordfail insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos1' linux /vmlinuz root=/dev/sda1 ro text initrd /initrd.img >
linux /boot/vmlinuz-4.0.0-1-amd64 root=UUID=5e285652 ro quiet 3
Always usefull when your nvidia drivers brick. The solution with using 3 instead of text did actually work. In my case, I had also to remove the resume=. part
Well, the simplest approach for a one-time boot to text mode would be to select the kernel entry you want to boot when at the GRUB2 screen, hit E , scroll down to the linux line and add text to the end. For example:
linux /boot/vmlinuz-4.0.0-1-amd64 root=UUID=5e285652 ro quiet text
Then, hit F10 or Ctrl + X to boot.
Unfortunately it doesn’t work for me either; if it matters, I’m using openSUSE 13.2, and the linux line is longer and has some more variables; anyway, adding text apparently does nothing on my system.
@Sekhemty please add the relevant linux line to your question. You can see it in /boot/grub/grub.cfg . I just tried this in an Ubuntu VM and it worked as expected.
Copy paste from /etc/inittab:
# 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 view current default target, run: # systemctl get-default # # To set a default target, run: # systemctl set-default TARGET.target #
systemctl set-default multi-user.target
Please take a look at this article: How to use Grub2 to boot Linux manually
Indirect booting by chainloading
For Grub1 if you want to fire up an OS, which can be any Dos, MS Windows, BSD, Solaris or Linux, installed in the 2nd partition of the 1st disk the Grub Legacy commands will be Code:
root (hd0,1) chainloader +1 boot
For Grub2 the commands are slightly different and the changes are highlighted in red Code:
set root=(hd0,2) chainloader +1 boot
Direct booting by naming the kernel and initrd files
Say if my Linux has vmlinuz-2.6.18-6-686 and initrd.img-2.6.18-6-686 in /boot subdirectory one can boot up the Linux with Grub1 commands of Code:
root (hd0,1) kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/sda11 ro initrd /boot/initrd.img-2.6.18-6-686 boot
For Grub2 the corresponding commands will be Code:
set root=(hd0,2) linux /boot/vmlinuz-2.6.18-6-686 root=/dev/sda11 initrd /boot/initrd.img-2.6.18-6-686 boot
Leonieclaire.com
To ensure a complete non-GUI mode boot on Ubuntu without installing or uninstalling anything, do the following:
- Open the /etc/default/grub file with your favourite text editor.
- Press i to enter into vi edit mode.
- Look for the line that reads #GRUB_TERMINAL=console and uncomment it by removing the leading #
How do I turn off graphical mode in Linux?
To switch back to text mode, simply press CTRL + ALT + F1 . This will not stop your graphical session, it will simply switch you back to the terminal you logged in at. You can switch back to the graphical session with CTRL + ALT + F7 .
Why does Ubuntu Server have a GUI?
A GUI takes up system resources (memory and processor) that are used for server-oriented tasks. However, certain tasks and applications are more manageable and work better in a GUI environment. This guide will show you how to install a desktop (GUI) graphical interface on your Ubuntu server.
How do I turn off gnome?
- Copy of the /etc/xdg/autostart/gnome-software-service. desktop file to the ~/. config/autostart/ directory.
- Open the copied .desktop file with a text editor and remove the NoDisplay=true. line in (or change true to false ).
- Now GNOME Software should appear in your Startup Applications list. Disable it.
How do I switch to GUI mode in Ubuntu?
To switch back to your graphical session, press Ctrl – Alt – F7 . (If you have logged in using “switch user”, to get back to your graphical X session you may have to use Ctrl-Alt-F8 instead, since “switch user” creates an additional VT to allow multiple users to run graphical sessions simultaneously.)
How do I start GUI mode in Linux?
- Step 1: Downloading and Installing PuTTY.
- Step 2: Downloading and installing Xming X Server.
- Step 3: Configuring the remote Linux system for SSH.
- Step 4: Running graphical Linux programs.
- Step 5: Select how to start Xming.
- Step 6: Enable X11 forwarding in PuTTY.
- Step 7: Enter Ipaddress for ssh graphical interface of linux.
How do I turn off Display Manager?
- Change from: GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
- Change to: GRUB_CMDLINE_LINUX_DEFAULT=”text”
- Update Grub with. $ sudo update-grub.
- Disable the Lightdm manager: $ sudo systemctl disable lightdm.
- Note:
How do I completely remove gnome from Ubuntu?
Look for Commandline: apt-get install gnome . If you did not install or upgrade recently, it should be the last one. Then just copy the list of packages installed with gnome to your sudo apt purge command. should remove everything co-installed if you haven’t changed the defaults.
How do I disable Gnome Display Manager?
To disable gdm from running during boot, you can either boot with the “text” boot parameter or disable the rc service like this: sudo update-rc. d gdm stop 2 3 4 5 . Please note that there is a dot at the end.
Is there a way to disable the GUI in Ubuntu?
How to turn off the screen in Ubuntu Server?
How to enable GUI on boot in Ubuntu 20.04?
Why is there no GUI in Ubuntu Server?
How to boot Debian into text mode without using GUI?
How can I boot Debian into text mode? My mouse and keyboard are working in GRUB, but when the login screen appears they don’t, so I can’t do anything.
6 Answers 6
You can also do CTRL ALT F key where F key is F1 to F6 to bring up that text login screen. Note that screen 1 is where the bootup information is.
CTRL ALT F7 will take you back to the GUI.
Going into single user mode stops many of the services which are present in the multi-user mode. This probably not what you want here.
At the boot prompt
If you’re at a boot prompt, boot in single user mode by adding 1 (or single ) at the end of the kernel command line. In that mode, you only have a minimum set of services started — filesystems are mounted, you can log in in text mode on the console, and that’s about it.
Fake display manager
There’s a way to specifically avoid starting a display manager on Debian. The scripts that start display managers at boot time check if they are the default display manager, to ensure that only one display manager will be run. So set a fictitious default display manager. Make sure that /etc/X11/default-display-manager exists but doesn’t contain the name of a display manager (e.g. make it empty).
Through runlevels
Unless you’ve installed an alternative init, Debian uses System V init, with runlevels. A runlevel is, roughly speaking, a set of services to run. The 1 above means runlevel 1, with very few services. Linux SysVinit has four levels (2 to 5) that correspond to normal system operation. Under Debian, these four levels have the same effect by default; it’s up to the system administrator to customize them if desired. In your situation, I guess you want to define a runlevel without X and make it the default.
- Arrange for level 2 not to start any of the graphical login managers (xdm, gdm, kdm, …).
- For e.g. xdm: remove the symbolic link /etc/rc2.d/S??xdm (where ?? are two digits), and replace it by /etc/rc2.d/K??xdm copied from /etc/rc0.d/ . S means “start”, K means “kill”; the symbolic links in /etc/rc$N.d indicate what services to start or stop when entering runlevel $N .
- Alternatively, install file-rc or sysv-rc-conf for easier runlevel management.