Linux mint boot in console

Linux Mint Forums

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

Getting Mint to boot directly to console

Post by webmint » Wed Apr 19, 2017 9:30 am

I want to configure Mint to boot directly to the console/command line, but most of the fixes I’m finding online seem to be out of date. I tried changing GRUB_LINUX_DEFAULT_CMDLINE in /etc/default/grub to «text,» which lets me watch the boot process happen but still boots the GUI. I also tried sudo systemctl disable mdm, which does boot to the console, but then I have a problem when I run startx about getting a prompt about the keyring not having been unlocked when I log in, and my Chrome browser seems to somehow not be automatically logged in to my Google account the way it should be. I also don’t know how to get startx to boot the GUI to TTY8, where it normally is when you start Mint the usual way, so I end up having to run it on something like TTY6.

So is there a better, more established way of doing this? And if not, how can I fix the keyring thing and how can I startx on TTY8 (or 7, anything but one of what should be an available console)?

EDIT: Something I did seems to have made the GUI now run on TTY7, which is where everything I’ve read said it normally is. Previously it was running on 8. No clue how I did that, but fine with me!

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Pierre Level 21
Posts: 12958 Joined: Fri Sep 05, 2008 5:33 am Location: Perth, AU.

Re: Getting Mint to boot directly to console

Post by Pierre » Wed Apr 19, 2017 9:52 am

you may want to change the runlevel of your machine:
http://www.linfo.org/runlevel_def.html
so — you want runlevel 3

like this:
Normally this is done by explicitly adding a number to the kernel options in the GRUB entry.

Let’s say, you do want to change default grub entry from default run level (5) to 3:

Find a place of default boot entry, and have a look at linux line. Might look something like this:

linux /boot/vmlinuz-3.0.0-13-generic root=UUID=d07e0c99-65ba-4eda-98d8-79693dc79554 ro quiet splash vt.handoff=7

Add 3 at the end of that line:
linux /boot/vmlinuz-3.0.0-13-generic root=UUID=d07e0c99-65ba-4eda-98d8-79693dc79554 ro quiet splash vt.handoff=7 3

Читайте также:  Linux bash text file

Image

Please edit your original post title to include [SOLVED] — when your problem is solved!
and DO LOOK at those Unanswered Topics — — you may be able to answer some!.

Re: Getting Mint to boot directly to console

Post by webmint » Wed Apr 19, 2017 10:30 am

Pierre wrote: you may want to change the runlevel of your machine:
http://www.linfo.org/runlevel_def.html
so — you want runlevel 3

like this:
Normally this is done by explicitly adding a number to the kernel options in the GRUB entry.

Let’s say, you do want to change default grub entry from default run level (5) to 3:

Find a place of default boot entry, and have a look at linux line. Might look something like this:

linux /boot/vmlinuz-3.0.0-13-generic root=UUID=d07e0c99-65ba-4eda-98d8-79693dc79554 ro quiet splash vt.handoff=7

Add 3 at the end of that line:
linux /boot/vmlinuz-3.0.0-13-generic root=UUID=d07e0c99-65ba-4eda-98d8-79693dc79554 ro quiet splash vt.handoff=7 3

This works, but it seems to be functionally equivalent to doing:

sudo systemctl disable mdm

And then, after boot and TTY login, doing:

In which case you still have to re-enter your password into the DE even though you’re already logged in on TTY. I guess perhaps that’s the only way to do it, and if it is, then that’s okay with me. I still do need to run the GUI from time to time but I want to learn the command line and I also like how much faster it is to boot straight to console. Plus if anybody decides to mess with my PC, they will have no clue what they are doing.

Источник

How To Boot To Console (Text) Mode Using Debian / Ubuntu, Fedora, Arch Linux / Manjaro And More

The instructions in this article should work with any Linux distribution that uses systemd (for the permanent mode below) and GNU GRUB (for the temporary mode), but I personally only tried this with Debian, Ubuntu, Manjaro and Fedora.

boot Linux in console mode (text mode)

Booting in console mode (text mode / tty) allows you to login to your system from the command line (as a regular user or as the root user if it’s enabled), without using a graphical user interface. This is useful in case your system fails to boot when using the graphical mode, or maybe you have a computer running Linux for which you don’t regularly use the GUI and ssh into it, so you’d like to save some system resources by booting in text mode. But regardless of the reason, this article shows you how to boot to console / text / tty on Linux.

Case A. Temporary booting to console mode (text mode)

Using these instructions, your computer will boot to console only for the current boot. After restarting the computer it will boot normally, so these changes are temporary.

1. To temporarily boot to console mode (tty), start your computer and immediately after the BIOS / UEFI splash screen, press and hold the Shift (BIOS), or press the Esc (UEFI) key repeatedly, to access the GRUB menu.

Читайте также:  Нужен ли linux файрвол

2. Once you see the GNU GRUB screen, with the first entry from the menu selected, press the e key. This allows you to edit the kernel parameters before booting.

Look for the line that begins with linux (use the Up / Down / Left / Right arrow keys to navigate); vmlinuz should also be on the same line. At the end of this line (you can place the cursor using the arrow keys at the beginning of the line, then press the End key to move the cursor to the end of that line) add a space followed by the number 3 . Don’t change anything else.

This 3 represents the multi-user.target systemd target which is mapped to the old, now obsolete runlevel 2, 3 and 4 (used to start and stop groups of services). For example the old runlevel 5 is mapped to the systemd graphical.target and using this starts. you’ve guessed it, the graphical (GUI) target. For more on systemd targets see this page.

Example #1. This is how the line beginning with «linux» looks like for Ubuntu 18.04 LTS (it doesn’t have to be identical for you, it’s just so you get an idea):

linux /boot/vmlinuz-4.18.0-15-generic root=UUID=1438eb20-da3d-4880-bb3a-414e+++0a929 ro quiet splash $vt_handoff

And this is how the line beginning with «linux» looks after adding the 3 at the end:

linux /boot/vmlinuz-4.18.0-15-generic root=UUID=1438eb20-da3d-4880-bb3a-414e+++0a929 ro quiet splash $vt_handoff 3

Example #2. This is how the line beginning with «linux» looks for Fedora 31 (it’s not identical for you, it’s just so you get an idea):

linux ($root)/vmlinuz-5.3.13-300.fc31.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet

And this is how it looks after adding the 3 at the end of the line:

linux ($root)/vmlinuz-5.3.13-300.fc31.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet 3

3. After doing this, press Ctrl + x or F10 to boot to console (text) mode.

To reboot your system while in console mode, use the reboot command ( sudo reboot ).

It’s worth noting that Debian and Ubuntu based Linux distributions (including Linux Mint, Elementary OS, Pop!_OS, Zorin OS, etc.) come with a recovery mode built into the GNU GRUB menu. So in case you use Debian / Ubuntu or some Linux distribution based on it, get to the GNU GRUB menu as explained above, then select Advanced options , and from the new list that comes up select the first entry that ends with (recovery mode) . Select this entry and hit the Enter key, and you’ll get to a menu that, among others, allows you to drop to root shell prompt — when selected, your system continues to boot to the command line and not a graphical user interface, allowing you to login using your root password. This allows access to the filesystem in read-only mode; for read-write use mount -o remount,rw / . Use this for example to reset a lost user / administrator password on Ubuntu, Linux Mint, Elementary OS, etc.

Читайте также:  How to launch program in linux

Case B. Permanently booting to text mode (console mode)

Getting your Linux system to always boot to console (text / tty) mode is as easy as running a single command:

sudo systemctl set-default multi-user.target

This command sets text mode as the default systemd target (runlevel as it used to be called before systemd). After running this command, reboot your system and it will automatically boot to console / text mode every time.

Don’t know the current systemd target used on your system? Use this command, which will show the currently set target:

Extra tip: using this, your Linux computer will boot to tty1 (text-only virtual console). You can switch to a different virtual console by using Ctrl + Alt + F2 for tty2, Ctrl + Alt + F3 for tty3, and so on until tty7.

In case you want to undo this change and get your Linux system to boot to the default graphical mode, use:

sudo systemctl set-default graphical.target

After using this command, reboot ( sudo reboot ) and your system should start in graphical mode, as it was by default.

Источник

How to boot into terminal on Linux Mint XFCE?

I have a Linux Mint XFCE system running on a lenovo z70. I’ve been trying to boot into the terminal on startup (but still allow me to start the graphical interface with startx if need be). Changing these settings here did nothing: http://ask.xmodulo.com/boot-into-command-line-ubuntu-debian.html and the directions here: https://community.linuxmint.com/tutorial/view/460 also do not work as there is no «quiet splash» line. I dont know if these are errors or what.

You didn’t specified version on your LinuxMint. If it latest 18.x version, it use systemd , you need to use: systemd.unit=multi-user.target in place of text

1 Answer 1

Linux Mint beginning with version 18 using different init system that calls systemd , so to be able to boot into console, one need to use:
systemd.unit=multi-user.target
Simply adding text to GRUB wouldn’t work on such systems.

There a few methods you can use to boot into console by default:

Method 1:

Comment line GRUB_CMDLINE_LINUX_DEFAULT=»» and add GRUB_CMDLINE_LINUX=»text»

#GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="text" 

then apply changes by running: sudo update-grub

Now, tell operation system what systemd target to use on boot:
To boot by default in terminal, run:
sudo systemctl set-default multi-user.target

Next reboot will go to console without loading desktop.

To revert changes above (re-enable boot to GUI desktop by default) you need to run:
sudo systemctl set-default graphical.target

Method 2:

To disable login to GUI desktop, you need to disable MDM (Desktop Manager) service:
sudo systemctl disable lightmdm

To revert changes, run:
sudo systemctl enable lightmdm

If you want to start GUI Desktop on demand without changing previous preference, you can run: sudo systemctl start lightmdm

Источник

Оцените статью
Adblock
detector