Updating Manjaro as safely as possible / logging out?

Thank you @Aragorn for this [HowTo] Updating Manjaro as safely as possible:

I’d appreciate, if you could add some more detail about

completely logged out

I’m doing such updates using a terminal $ pamac update -a. Is this what you mean? But doing so, the graphical session is still running, or am I wrong?

1 Like

Well, you do have to log out of the graphical session.

UNIX systems are multi-user, so simply switching to a tty and logging in there is simply a second login, but your GUI session would then still be running, and as such, your shared libraries and such would still be in an open state and loaded into memory, which could create problems when they are being overwritten on disk by the update process.

I’m guessing @MaMicha means how to get there, not neccessarily why.

And best of my knowledge that would be as follows:

  1. Boot your machine as normal.
  2. Let it go to the login screen, but do not log in,
  3. instead press Ctrl+Alt+F1 or maybe even Ctrl+Alt+F2 (I’m unsure about this) to get a text-only login prompt. That’s the TTY (AFAIK anyway.)
  4. Login there, and continue as per the thread mentioned.

Hope this helps!

3 Likes

Thank you @Mirdarthos, that was my point.

Remains the question, how to return how to safely return from Ctrl+Alt+Fx (with x = 1…4); I managed to enter the TTY, but could not leave …

EDIT: My desktop is KDE

It depends on the desktop environment. Plasma runs at either tty1 or tty2 — it varies between reboots — and XFCE runs at tty7, but I think GNOME runs at tty4.

So the best choice is tty3.


Technically, by exiting the tty session — just type exit or press Ctrl+D, and then use Alt+F-key, depending on which GUI you’re running — see above.

However, after a full system update, you need to reboot anyway, so you might as well stay in the tty and type… :point_down:

sudo systemctl reboot
1 Like
What @Aragorn said.

Just go back to the GUI by pressing Ctrl+Alt+F1 or Ctrl+Alt+F2

1 Like

Again, it depends on the GUI. If you’re on XFCE, then it’s Alt+F7. No need for the Ctrl key when you’re in the tty.

Thank you! tty3 also applicable with KDE?

1 Like

Yes, tty3 is always free, regarding of what desktop you’re running.

You can even test it right now. Just press Ctrl+Alt+F3 to switch to tty3 — you don’t have to log in — and then switch back to Plasma with Alt+F1 or Alt+F2. Again, it varies whether Plasma runs on tty1 or tty2 — it’s unpredictable.

You’ve either way got plenty of ttys to try. :wink: And tty12 has your system logger (journald), normally.

2 Likes

Taken from the @MirdarthosAs If I’m 5” Series of Instructional Tutorials (2023).

2 Likes

Hey! Although not started by me, it really is a thing:

https://www.reddit.com/r/explainlikeimfive

And quite handy.

1 Like

:laughing:

Or just

reboot

:stuck_out_tongue_winking_eye:

Or, just sudo shutdown -r now, if we’re being pedantic. :face_with_monocle:

Any of these are certainly more graceful than the off button frequently used in the wild west of Windows adoption.

I recall my mother once telling me “One day, I’ll buy you a Cowboy Outfit…”. Imagine my surprise, when years later she bought me a share in Microsoft. :crazy_face:

2 Likes

Thank you and my apologies for the delay, other obligations took my time …

Using KDE, Ctrl+Alt+F3 works to switch to tty3 and Ctrl+Alt+F2(NOT Ctrl+Alt+F1!) brings me back to the LogIn-Screen.
Using the tty, $ pamac checkupdates -a shows the list of packages, but this might be old data, as my laptop is connected by wLAN only. How do you manage this, wired LAN?

1 Like

Always update your repository packages first, and only afterwards your AUR packages, Snaps, FlatPaks and whatever else there is. Also, regularly update your mirrors. :point_down:

sudo pacman-mirrors -f && sudo pacman -Syyu && pamac update

Thank you,
but what about the Internet-connection? For my understanding, you propose these steps (using KDE):

  1. RE-Boot with NO LOGIN
  2. Ctrl+Alt+F3 and LogIn to tty.
  3. your commands:
sudo pacman-mirrors -f && sudo pacman -Syyu && pamac update

I did not try, but for my understanding the wLAN connection should be missing …

Wired Ethernet should normally be active system-wide by default. It does not depend on logging in.

You are right,

but my laptop is typically not connected to wired ethernet. My hope was to find an easier solution, without wiring …

Well, how much trouble is it to plug in the Ethernet cable before updating your system?

3 Likes