Sometime, it can happen that Manjaro developers recommend, because of specific circumstances, to do a system upgrade "within a tty." This guide aims to help you to apply the recommendation successfully and as easily as possible. There are pictures so you can see what it looks like before actually doing it yourself.
What does "within a tty" actually mean?
It means to do the system upgrade in a pure command line interface (CLI), outside of your graphical environment.
How do I do a system upgrade "within a tty"?
In a nutshell
- Log in
sudo pacman -Syu
The first thing to do is accessing a pure command line interface. The method to use is more or less the same on every Manjaro edition.
- General: Press CTRL + ALT + F2, F3, F4, F5 or F6.
- GNOME: Press CTRL + ALT + F3..F6.
(Note: On some laptops, you might have to press the Fn key too.)
If it is done correctly, you should end up in a black screen like this.
Enter your credentials (username + password) like if you were in your regular, graphical login screen in order to log in. Once it is done, you should have a prompt.
Now, you can use any commands that you want like if you were in a terminal emulator. You may do a system upgrade with the
sudo pacman -Syu command (or equivalent, although check in the official announcement beforehand if there's a particular recommendation from Manjaro developers in that regard).
You may try to return into your graphical session if you want (CTRL + ALT + F7 for most editions, CTRL + ALT + F2 for GNOME), but you might prefer to reboot your system immediately instead. To do so, use the following command:
Why such a recommendation?
This recommendation is mentioned in the official announcement. In general, it is a good practice to read the announcement and also the "Known issues and solutions" post in addition before upgrading your system in every case.
This recommendation is issued when there's a risk that the graphical session crashes during the upgrade. If that happens while you are either using a graphical package manager OR a CLI package manager that has been run in a terminal emulator, it means that the package manager will crash too, thus stopping the upgrade abruptly. A package manager that stops functioning in the middle of a system upgrade is extremely bad, and your system will most likely need to be repaired if it happens to you.
- You will be in a partial upgrade situation. At best, some unimportant software will stop to work until your system is repaired properly; at worst, it will make your system completely unbootable.
- It may corrupt your local package database that stores all the information about packages currently installed on your system, which can cause trouble with package management later. (Error: could not open file /var/lib/pacman/local/[...]/desc: No such file or directory)
By doing the system upgrade outside of the graphical session when it is recommended by Manjaro developers, you avoid this particular risk, thus increasing your chances of doing the system upgrade smoothly.
If you want to go further...
...you may want to do change your runlevel in order to reduce the risk even more by switching to a more minimal runlevel that doesn't launch any graphical session at all. To do so, change your current runlevel with the
systemctl isolate multi-user.target command. Once it is done, you can log in and do your system upgrade. For more information, see the following articles: https://wiki.archlinux.org/index.php/Systemd#Targets .
Note that changing your runlevel temporarily is generally simply overkill: just switching to a pure command line interface should be more than enough.