What updating from terminal actually means

So I have read many times on the forum when an update comes out saying update from terminal is recommended.
Now, the question is that does it mean updating from a terminal like konsole, gnome terminal etc or using tty?
I haven't found a good answer of it in the forums so would really appreciate an appropriate answer.

1 Like

With from terminal tty is meant. But usually you should also have no issues when updating from konsole or even from Octopi. Only if it is specifically stated in the update thread to update from terminal, then I would switch to tty for the update.

I personally do all my updates from konsole. Never had issues so far....knockOnWood

2 Likes

I am not sure I agree with the previous poster.
Things can be sorta sorted like this:

GUI - Normal
Terminal (konsole, etc) - More Safe
TTY (Ctrl+Alt+F3) - Safest

I've even heard of some folks only using TTY for updates.
[and I only use terminal - sudo pacman -Syyu]
But that is not really necessary... many moons ago there was a systemd update that required a drop to TTY (or else it would fail part way through) but I havent seen much like it since.

Most likely the recommendations you are referencing simply mean a normal terminal to get around some oddities that octopi/pamac GUI dont automate properly.

...That was most likely but I apparently missed some posts:

Call me paranoid, but I update from the TTY almost always. Once in a while I'll update from Konsole, never gui.

philm has recommended doing major kde/gnome updates in a TTY in several threads over the last several days as several people had DE freezes in the middle of the update process. I suspect that may be the source.

oo. didnt notice. :speak_no_evil:
(and been fine ... gonna pull the trigger on pacman again just for fun ...later: I survived!)

Right but how to use tty for the update process? Is it just as plain simple as logging into a tty
or do you need to use the multi users mode which I happen to learn about on the forums. Since normal tty switching will not close the x server and that would still be running which might probably erase the profit of using a tty in the first place. Also I have learned that using a multi users mode might not allow you to use wifi and you can't upgrade without WiFi. P.S : using that might cause a problem with split updates e.g if Mesa is being upgraded so the hooks will be removed first.
I would really like to get a word on that.

Yes. You login to a TTY and run pacman to do your updates with sudo pacman -Syu

I think the theory is that even if the X or your shell freezes the updates will be less likely to get impacted.

You shouldn't need to drop out of your graphical target. However, switching to the multiuser target shouldn't block you from using wifi. It is possible you would need to manually connect if you are relying on a graphical process to make your connection and/or hold your wifi password.

Am I missing something with wireless there?

As a side note, I don't think many people update from the TTY. Personally, I only update from the TTY if my DE is inaccessible.

I could see a scenario where maybe you might need to do something like systemctl restart NetworkManager but still unlikely and surmountable.

I was actually referring to this post when I said that multi users target mode won't support wifi.


Anyway thanks for correction.

The difference is that Pamac (and probably Octopi, although IDK) has a different library built on top of libalpm for doing package installs/updates. This partial re implementation of some pacman functionality means that it might not be as stable and might produce undefined behavior with big updates for one reason or another. I don't really see any specific reason for that, but oh well.

As for the difference between a tty and a terminal emulator in your desktop environment, it's simply that a tty is not as high in the process tree as a terminal emulator. The tty has only three nodes: systemd, your shell, and then pacman. If you're in a DE with a terminal emulator, there are a bunch of nodes between the shell and systemd, which means more things could fail and cause your update process to be stopped halfway, and possibly screw up your system. This would most likely be caused by a package being unpacked onto the system and playing around with some configuration file which an older running version of the program thinks it needs to read and use, doesn't understand the input for one reason or another, and crashes, ending it's whole process tree and killing pacman.

That said, I've always used Konsole and I've never had any trouble. Another note, using tmux or screen inside a konsole instance should prevent the above scenario from happening, because the shell is the child of your multiplexer's daemon, not Konsole. Even if the DE crashes, your update will still be running.

1 Like

I update with konsole (unless tty is specifically stated) and only had an issue once.
My DE froze during update, i waited for a while, TTYed and rebootet from there and the update was finished properly.
So unless i missunderstand "tmux or screen inside a konsole instance" it doesn't seem necessary to achieve "independence" from DE? Or i've just been lucky ^^
But if i'm wrong, using screen would be an very easy and convenient way to be 100% safe, woulnd't it?

I use variously the update from the notifier that sits in my task bar, the CLI and pacui. Pacui also affords a lot of other useful utilities.

The "safest" would actually be to switch to runlevel 3, but that's probably overkill, although old habits die hard...

But as you said, it's not really necessary.
Just a few days ago, I updated an old KDE install that hasn't been updated in 3 months. Everything done from a terminal inside KDE without a problem - but immediately followed by a reboot.

1 Like

Oh, oh, this could go on forever if we're going down that road now. Mass confusion to follow. :confused: :smile:

Oh wow. This is brilliant. If the desktop freezes during the update then I can re-attach to the screen from tty and copy from the scrollback buffer as well. I would never have thought to use screen like this.

Yeah, my standard setup uses tmux inside of konsole.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by