&& 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.
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.
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.
Are you serious? That’s a thing? I’ve been doing apt update and apt upgrade for years
It also has sudo apt autopurge which does autoremove --purge
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.I didn’t know any of this, thank you both :)
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.
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.