Let's Learn Linux!: Finding and Installing Software - Issue #6 - GaiaYoga Gardens, Lower Puna, Far East Big Island, Hawai'i - Saturday, March 25, 2023

avatar

Polish_20220714_121452303.jpg

Polish_20220714_121631044.jpg

Polish_20230217_163432316.png

Polish_20220714_121631044.jpg

Warm greetings fellow Linux-and-FOSS lovers! πŸ˜πŸ™πŸ’šβœ¨πŸ€™

Welcome to another installment of Let's Learn Linux! Before I dive into the topic of this issue, I'd like to mention some Linux-relevant good news! My new computer has shipped! Even though it says that it will still arrive between April 15-18, I think it'll probably be delivered earlier. I can't wait to get my hands on this machine!

Polish_20220714_121754649.jpg

The other cool bit of news is that I helped @aukuna install Arch Linux (in addition to Ubuntu that we installed previously) on his new Lenovo ThinkPad T470 laptop. There were some odd quirks working with the UEFI firmware, and with the NVME SSD, though thankfully we have been able to successfully work through any challenges which have arisen. Today in the morning we successfully booted into a graphical interface for the first time, in this case KDE Plasma. There are two other minor issues to address with the GRUB boot menu and his wifi adapter, but we'll resolve those shortly. He's having a lot of fun exploring and customizing things!

Polish_20220714_121754649.jpg

Now on to the topic of the day, finding and installing software! This is probably the one area where the various distributions of Linux differ the most; package management! Each independently-developed distribution generally has their own unique package manager. Distributions that are based on other distributions, like Ubuntu being based on Debian, tend to share the package manager and package management process of the source distribution.

Polish_20220714_121754649.jpg

I've had the most experience with Ubuntu and Arch, with Arch's package management being far more interesting and diverse. For that reason, in this post I'm going to focus on how Arch does it.

Polish_20220714_121754649.jpg

In Arch Linux there are many ways to find and install software. The most common method is to use pacman (Arch's package manager) to install precompiled (pre-built) binaries from the official repositories (core, extra, community, and multilib). This method is quick and easy, and doesn't require any extra effort.

Polish_20220714_121631044.jpg

To search for software packages in the official repositories using a terminal, which is the officially-supported method, run:

pacman -Ss <package-name or keyword>

This will output a list of possible packages. Once the desired package or packages are located, run as root or via sudo:

pacman -S <package-name> 

Multiple packages may be installed at the same time by separating their names with a space:

pacman -S <package-name> <another-package-name> <yet-another-package-name>

Polish_20220714_121631044.jpg

In addition to the official repositories, there are also a good number of other community repositories which can be used as well, though that requires adding the appropriate repository information to the pacman.conf file and adding the relevant package-signing keys (used to verify packages), so just a bit more effort. Once the new repositories and their signing keys have been added, then pacman can be used to search and install packages in the same way that I described above.

Polish_20220714_121754649.jpg

These various community repositories sometimes have specialized software, or software that is compiled in certain ways. Sometimes they simply have software that is not presently found in the official repositories. The one caution that I will give regarding these other community repositories is that not everyone builds packages with the same ethics or care, which can sometimes cause problems with certain packages not playing well with other officially-installed software, or the system in general.

Polish_20220714_121754649.jpg

A third way to install software packages is to use applications such as debtap, which is designed to extract Debian/Ubuntu/Mint-based .deb installation files, and repackage them into Arch package format. Once this is done the repackaged software can then be installed by pacman with the following command.

Polish_20220714_121631044.jpg

This command must be run from the same directory where the repackaged installation file is found, or the full path to the file must be added. 

If in same directory:
pacman -U <exact-name-of-file>

If in different directory:
pacman -U /path/to/file/<exact-file-name>

Polish_20220714_121631044.jpg

There are applications in Arch Linux that repackage installation files from other distributions as well, though so far I've only used debtap, which works quite well in most cases.

Polish_20220714_121754649.jpg

The fourth way to install software in Arch is to use what is called the AUR (Arch User Repository) and the ABS (Arch Build System), to build software packages from source. This is done using PKGBUILD files, which are simple text files which tell the makepkg application how to build/compile a particular package. The AUR has many thousands of community-maintained PKGBUILD files for a wide array of software that does not exist in the official repositories. PKGBUILD files are also available for all packages in the official repositories as well, allowing them to be built/compiled in particular ways, to meet specific needs.

Polish_20220714_121754649.jpg

There is the official way to build packages from source, and then there is the method using any one of several AUR Helpers, such as yay, trizen, pikaur, among others. There is nothing wrong with using AUR Helpers, though it is a good idea to know how to build packages from source using the officially-supported method first. Most AUR Helpers recognize pacman commands as well, so searching and installing packages will generally use the same commands, though when searching the AUR is queried too, as well as the official and other enabled repositories, so it's a more complete view of available software. There are also graphical programs to install packages using pacman, makepkg, and various AUR Helpers as the backend. AUR Helpers should only be run as a regular user, not as root.

Polish_20220714_121631044.jpg

The oficial method, run as a regular user (not root):

git clone <URL-of-package-git-reposority> 

cd <directory-of-package-git-repository-just-cloned>

makepkg -sic (sync necessary dependencies, install package using pacman, and clean build files once completed)

If you're rebuilding a package that has already been built (file exists), it's necessary to use the -f (force) flag, either alone, or combined with other flags: 

makepkg -f

Polish_20220714_121631044.jpg

There are actually other ways to install software in Arch as well, such as installing Windows applications using WINE, installing self-contained packages using FlatPak, SNAP, or APPIMAGE, and even via Ruby or Python, though the methods I've mentioned here covers the most common ways.

Polish_20220714_121754649.jpg

That brings me to the end of another installment of Let's Learn Linux! I hope that you found this post interesting, engaging, educational, and hopefully even inspiring! Until next week! 😁 πŸ™ πŸ’š ✨ πŸ€™

Polish_20220714_121551463.jpg

Thank you all so much who have helped me get to where I am today, and allowing me to share more of the beauty and magic from my life and my world with you, and for your continuous appreciation and support! I am truly deeply grateful! πŸ˜πŸ™πŸ’šβœ¨πŸ€™

Polish_20220714_121551463.jpg

If you'd like to find me on other alternative platforms where I have accounts (I spend most of my time here on Hive), click on this signature image below to go to my LinkTree page.

Polish_20220714_123613996.png

If you'd like to send me a BTC Lighting Tip (made possible by the fantastic work of brianoflondon on @v4vapp), just scan the QR image below. πŸ‘‡

tydynrain.png

Sources
Signature image created by @doze, and the dividers made by @thepeakstudio, with all tweaked to their present form by me.

Banner image created by me using Polish, with the Arch Linux logo converted into ASCII art, and Tux the Linux Peguin created by Larry Ewing.

Polish_20220714_121452303.jpge



0
0
0.000
3 comments
avatar

Ugg. I have forgotten all about this. I still need to ensure all wanted personal data is off my old laptop before I can reformat it and make it into a linux machine. I am wondering if I will need to departition it, or if the system/data partitions can remain. Been a while since I have installed linux on a system.

0
0
0.000
avatar

Hehe...no worries, I understand! There's a lot going on here to keep track of everything! Linux is generally very accommodating, so it tends to adapt to your needs. Partitions from Windows can remain, though Linux file systems are more efficient, so don't require defragmenting. It's easy enough too to transfer data from a Windows partition to a new Linux partition. πŸ˜πŸ™πŸ’šβœ¨πŸ€™

0
0
0.000