Skip to content

Instantly share code, notes, and snippets.

@clintonbrito
Last active June 24, 2023 23:32
Show Gist options
  • Save clintonbrito/b01f27cd6e46f533bf5e309358686f99 to your computer and use it in GitHub Desktop.
Save clintonbrito/b01f27cd6e46f533bf5e309358686f99 to your computer and use it in GitHub Desktop.
Useful terminal commands

Find a specific package

Custom grep command to sort all flagged installed apps into their package-manager. All you need to do is to enter the command in the terminal, replace <app-name> in the command with your selected app and it will sort it for you.

This includes dpkg, snap and flatpak packages.

( echo -e "\033[1m\033[4m\033[34mSnap packages:\033[0m"; snap list | grep -v Name | awk '{print "  "$1}'; echo ""; echo -e "\033[1m\033[4m\033[34mFlatpak packages:\033[0m"; flatpak list | grep -v Application | awk '{print "  "$1}'; echo ""; echo -e "\033[1m\033[4m\033[34mNative packages:\033[0m"; dpkg -l | grep -v "^ii" | grep -v "^rc" | awk '{print "  "$2}' ) | grep -i --color=always <app-name> || echo -e "\033[1m\033[31mNo results found.\033[0m"

Font: https://askubuntu.com/questions/1457293/how-to-find-wether-an-app-is-a-snap-or-a-flatpak-or-a-native-app-in-terminal

Install multiple Flatpak packages from Flathub unique identifier

Flatpak identifies each application and runtime using a unique three-part identifier, such as com.company.App. The final segment of this address is the object’s name, and the preceding part identifies the developer, so that the same developer can have multiple applications, like com.company.App1 and com.company.App2.

flatpak install flathub com.google.Chrome org.gimp.GIMP

Doc: https://docs.flatpak.org/en/latest/using-flatpak.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment