In this article, we would cover how to boot Ubuntu 22.04 release in text mode. For numerous reasons, one may want to boot to text-mode. By default, standard Ubuntu installation boots in graphical mode. But, we can change that. It is possible to boot our system directly in text mode.
Its worth mentioning here that, please take extra care while making following changes. Also, if you don’t understand what you are about to execute then, please contact your System Administrator for assistance. Besides, superuser privileges are required for following operations.
If we are about to do some system heavy work which can be done through a command-line. Then, it is always good to boot in text-mode. That will save lots of resources which a graphical system would otherwise consume. And, when our system is used to do heavy work through a command-line regularly, it is better to set text-mode as default boot mode.
Boot Ubuntu 22.04 in text mode
First, we need to take backup of the grub configuration file –
sudo cp /etc/default/grub /etc/default/grub.backup
Now, use a text editor of your choice to edit the grub configuration file. We have used nano text editor –
sudo nano /etc/default/grub
and uncomment the following line, it should be (remove # at the beginning)-
GRUB_TERMINAL=console
save and exit.
Next, since we have made changes to grub configuration files. Therefore, we need to update grub as well –
sudo update-grub
And, use the following command to change systemd target unit –
sudo systemctl set-default multi-user.target
It will remove the default.target and creates a symlink to multi-user.target
Lastly, reboot the system. It should boot in text-mode.
Now, what if we want to again make graphical mode as default. In that case, we need to kind of reverse the changes.
Boot Ubuntu 22.04 in Graphical mode again
Edit the grub configuration file –
sudo nano /etc/default/grub
add # at the beginning of the line, it should be –
#GRUB_TERMINAL=console
And, update grub –
sudo update-grub
To change systemd target unit –
sudo systemctl set-default graphical.target
It will create a symlink to graphical.target. Lastly, reboot the system.
In conclusion, we have discussed how to boot Ubuntu 22.04 to text-mode as default and then revert default to graphical mode.