A tutorial on the basics of maintaining your Linux system

Hello again! Last time we talked about how to install and run a Linux distribution, specifically Endeavour OS, but this tutorial will work for every major Arch-based distribution. In this post we'll talk about:

Without further ado, let's get started.

How to use “pacman”

Pacman, short for package manager, is the package manager for Arch Linux and Arch-based distributions. It is my personal favorite package manager for it's simplicity and ease of use, while also being extremely robust. One advantage of Linux over Windows is the way that you install software. In Linux you'll be using a package manager to install your software almost all the time, advantages include:

I know that it seems a bit confusing, but honestly you don't even really have to know what the command means. All you need to know that running “sudo pacman -Syu” will update your system, and you should run it daily in order to not fall behind on updates. Because we just did a fresh install of Endeavour OS, depending on how old the ISO was, we might be very far behind on updates, or not at all; you might get only a few updates needed, or a few hundred, in either case, just run the command, proceed by hitting “y,” and go grab a cup of coffee.

Hopefully the update went smoothly and no errors occurred. A reboot of the system is highly recommended as some packages like the Linux kernel needs a reboot for the changes to take effect. Once you reboot, everything should've hopefully booted fine and you should be back on the desktop environment.

Great! Now that our Linux is all up to date, let's learn how to install a single package:

Easy right? But what if you don't know the package name on hand? We can search for packages by using the command:

Now let's learn how to uninstall a package:

That should cover the basic necessities for using pacman! We now know how to install, update, and uninstall. If you need to do anything else with pacman, remember that search engines are always your best friends, unless they're spyware search engines, in which case don't use them. Stackoverflow gets a lot of bad rep but for a beginner user, they're pretty good.

How to use the AUR.

As explained in the last post, Arch Linux comes with AUR support, a community ran repository of software that can't be found on the main repository. If the package on the AUR becomes popular enough, often time it can move from the AUR to the official Arch Linux repos. Keep in mind though that because AUR packages are ran by users and managed by them, it can be risky as some users can be total dickbags and install malware on your machine; although this is extremely unlikely, you should always exercise caution when using the AUR.

There are many ways to install packages from the AUR, but the most popular and easy way is to use an “AUR Helper.” In this case, Endeavour comes with “yay,” a very popular and robust AUR Helper. If you're comfortable with using pacman, using yay will be second nature because a lot of the commands are identical.

In order to install an AUR package, first find the package name. What I like to do is search up “Arch Linux “package-name” on my favorite search engine, and this finds me the package name 99% of the time. Keep in mind that if the package isn't on the AUR but on the official repos, then using yay isn't necessary and pacman will work fine. You can also go to the AUR homepage and search for packages from there.

Once you've found the package name of the package you want to install, installing it is a piece of cake:

Once the AUR package has been installed, the package is now being managed by pacman,so you can uninstall the package with either “pacman -R(sn)” or “yay -Rsn,” your choice. Keep in mind that yay is basically a front-end to pacman, with support for the AUR. So in theory you could just use exclusively yay for installing, removing, and updating software. But I don't do this because idk I probably have autism. So for the pacman section above, every command listed up there that has the word “pacman” can be replaced with “yay,” but please note that sudo still isn't required as you are using yay now, yay will have it's own way of prompting you for root access

Removing programs with yay is simple, it's the exact same as the pacman command:

As stated before, you can uninstall packages not installed through yay, with yay. So packages on the main repos installed through pacman can be managed by yay because in a sense yay is just pacman with some extra features like AUR support.

Anyways that should do it for this blog post. Thanks for taking the time to read all of it. I know that it can seem confusing at parts but always remember that this should be fun, but a hassle or a chore. Search engines are your best friend as always, and feel free to contact me with any and all questions you have.