Dont you mean: sudo apt update && sudo apt upgrade
Yea
apt-get
is so 2010Nope. I meant paru.
Ain’t nobody got time for two commands.
sudo apt upgrade --update
Are you serious? That’s a thing? I’ve been doing apt update and apt upgrade for years
Yes.
Also don’t forget && exists for sequential completion of any commands
&&
executes the second command, if the command before was successful,||
executes the second command if the first one was unsuccessful and;
executes the second command regardless of success.These are much more useful than the :() :;: operator
Fun fact and disclaimer: this is a fork bomb. i tried it to run it on my phone via termux, thinking android would act up and terminate termux; but nope, my phone froze. Thankfully i hard-reset my phone by holding [VOLUME_DOWN]+[POWER] for ~5 seconds.
Expanded it’s more clear what’s going on.
bomb() { bomb | bomb & } bomb
TSA would like to know your location
I didn’t know any of this, thank you both :)
Yeah, I was doing
sudo apt update && sudo apt upgrade
I may be totally confused but I’ve also always done it in that order, otherwise I feel like it would run upgrades from your cache of the apt repos (possibly hitting errors as stuff likes to change), then after it would run apt update (updating the repos).
My thought has always been update repos, then check those repos for software upgrades. I could definitely be wrong though.
Presumably running upgrade with the update flag does it all in one go.
Yeah but shouldn’t the order matter? My understanding was that && just said 'after the previous command, run this… ’ so running upgrade before update would miss any changes changes to repos… From what I can tell update is required before upgrade (just like you have it), doing it in reverse missed a ton of updates for me.
If it were upgrade && update, yes that would miss the boat. --update is a baked in feature of apt upgrade, so it knows what to do ^_^
Presumably running upgrade with the update flag is smart enough to do it in the proper order because there would be no point in doing it in the opposite order. Many other package managers just work like this out of the box. Homebrew is such an example. Running upgrade automatically does “update” first.
I’m absolutely serious.
You can also add a package name to install it at the same time as doing the upgrade, though personally I prefer to do that as a separate command so I can see what dependencies are needed.
It also has sudo apt autopurge which does autoremove --purge
sudo apt update && sudo apt upgrade
It’s insanity. I had to upgrade my work laptop to windows 11 this week.
IT didn’t do their research and turns out our main software isn’t compatible with windows 11 at all. So i had to downgrade back to windows 10. When i did, photos don’t work and the microsoft store wont open.
Windows is such a horrible system, i have no idea why they made it so poorly. I could have installed any distro of linux and had it working well in less than 20 minutes. Upgrading to windows 11 took almost 2 hours and it still didn’t work.
Now IT has to scramble to find a solution before the 14th and we lose all security updates, which they are very concerned about. What a nightmare to be in IT.
It’s always a nightmare being in IT lol
Nobody ever calls to say, “Hey! Just wanted to let you know that my email is working great, keep up the good work!”
We only hear from people when shit is broken.
Being in a windows shop only makes it 100x more difficult and expensive.
Be me -
Gets the Ok from IT to switch to a Linux Distro for my work desktop.
Gets the Ok from my direct manager.
Gets the Ok from our contracts manager who used to be in my direct managers position before.
Direct manager reaches out to lead developer, who happens to be a windows fanboy, for the web app we use to ensure “compatibility”, gets told to be careful of what I do and our cybersecurity insurance won’t cover it.
Be me, looking around at all the minuscule pieces of hardware connected to the internet likely running some form of Linux or Unix.
It’s a fucking web app. Make sure it works for a browser. You suck as a web developer if your shit web app needs to work on a specific OS.
And those are fighting words because I build web apps.
I’ve started noticing websites just to refuse to work on Linux:
- Xfinity
- Microsoft
- United Airlines
- American Airlines
It’s not like some weird script error either. It’s straight up a 403 Forbidden on certain routes. Works perfectly fine if I switch to my Windows laptop. It’s like it took one look at my user agent string and decided I was a bot.
Not saying you’re wrong, but if you’re running a VPN it could be that as well. More and more sites are demanding CAPTCHA tests and verification holds or just returning 403 for VPN access no matter what OS you are running.
I cooked up my own VPN and I still get blocked sometimes because it’s a data centre IP. For example, Wikipedia blocked the whole /30 range.
No VPN.
Man they get really up in your business if you aren’t using Chrome and their dinky extension, that I swear he pulled from someone’s GitHub and rebranded as his own, which all it does is open file links in the file browser.
I made a point by switching my user agent on Zen Browser to report as Chrome, Ubuntu haven’t heard a peep about it yet.
Side note at one point in time the clock-in we use, which is also a web app, had its admin/manager panel exposed to everyone in the company, I reported it and all I got was a thanks.
Click Update and Shut Down
Windows: Updates and restarts
trollface.jpg
Install Windows - does updates as part of the installation process. Get to desktop and check for updates - more updates to install. Reboot and check for updates again - yet more updates.
No it will update and once that is done it will shut down. But the update includes a restart so it will restart and then require you to type your password so it can finish the update, after which it will shut down.
Ain’t nobody got time for apt-get. apt all the way.
Yeah it’s crazy to me that people default to it. For scripts, sure, but apt is so much prettier.
I use apt in scripts and docker files. I don’t even know what apt-get is supposed to do better there?
It has a stable API but realistically I can’t see them changing apt so much it matters.
People are creatures of habit and apt didn’t always exist
I recall somewhere that it makes some kind of difference in scripts
apt-get has a stable API is my understanding.
wdym “a stable api”?
The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break backward compatibility this is not guaranteed either if a change seems beneficial for interactive use.
oh, ok.
but i wouldn’t care. i’d say “fuck it, we ball”
(confirmable by the number of
--noconfirm
s used inhistory
)That’d just the difference between them, I don’t think it’s something to worry about in your personal machine. Maybe if you’re writing a script that thousands of people will use or something.
A mythical thing. Humans tell stories of impossible things around campfires and by the light of monitors
I’m on arch so its the highlight of every morning 🤣
Well, true, one of the slowest packaging systems in Linux world is still faster than Windows Update.
pacman -Syu
– noconfirm
–no-preserve-root
do as I say
I’m on Garuda, so I just type
sudo update
I can still type out pacman -Syu, but nice that I don’t have to.
The beauty of Linux is the triviality of creating an alias that runs whatever long or short update command by typing “upd” or “release_the_epstein_files”. E.g., in
~/.bashrc
, place:
alias release_the_epstein_files="sudo pacman -Syu --noconfirm"
Fedora does this too, it reboots to install updates…
Gnome Software does this with offline upgrades. It’s optional. Doing sudo dnf upgrade is the same as sudo apt update && upgrade. No reboot. Obviously you should reboot for kernels and certain hooks but otherwise yeah. You can disable gnome software automatic downloads etc
sudo pacman -Syu
sudo yay
You don’t run yay with sudo.
How do you know what I do?
You can just use
yay
, since you will be prompted for your password anyway.Yep, and yay will bitch about you using sudo and make you redo it without sudo.
ssu in config,
yay -Syu
I believe sudo pacman without an argument works aswell
yay
“I use arch … btw”, also btw
For APT enjoyers,
alias yay="sudo apt update && sudo apt upgrade"
Also,
alias nay="yay -Rns"
Or yeet if you prefer, for the yay/nay or yay/yeet pair.
Thank you for this, I love it. We use Ubuntu at work and I am quite tempted to covertly add yay as an alias.
sudo nix-channel --update
sudo nixos-rebuild switch
nvim flake.nix
sudo nixos-rebuild switch --flake .
sudo zypper ref && sudo zypper dup
Fellow OpenSUSE enjoyer right there
Which just sounds ridiculous frankly. Even when you know what it means it still is rediculous.
Is it?
refresh makes it more clear than update that you’re not updating the computer’s packages, just the database of packages
DPKG based distros also need dist-upgrade or full-upgrade, rather than just upgrade, when you are switching versions where removals might be needed
Oh don’t get me wrong, I use Suse on a laptop. The commands strike me as funny looking. Like if I didn’t know what they did.
There is nothing more serious than Zypper!
I gotta say, apt-get is not my favorite way to update… yay is so much simpler.
Yay but especially apk keep it much simpler than apt.
Apk?
It’s Alpine Linux’s package manager.