HyperSphere

Various tutorials and articles on privacy and security on Linux.

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:

  • How to use the package manager: “pacman”
  • How to use the AUR
  • How to keep your installation up to date

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:

  • Easy installation of software with just a single command, no more having to download .exe files and installing manually.
  • Simple way to manage software and their updates, no more using outdated software, although you can if you wanted to with just a few configurations.
  • Extra added security assuming you're downloading from a trust and reliable repository. pacman Before we do install or uninstall anything with pacman, let's make our system up to date. Because Arch Linux is a rolling release distribution, you'll get updates as soon as they're available on the repository, so expect frequent updates for all of your software. Follow the mentality of “Install once, update daily.” Unlike non-rolling release distributions, Arch Linux doesn't really have a “version,” like how Centos has Centos 7 or Centos 8; Arch Linux is just Arch Linux, and you shouldn't need to reinstall just to keep your system up to date, just update with pacman and you're good! In order to update your system with pacman, use the command “sudo pacman -Syu”. I'll break down each part of the command so that you can understand it:

  • sudo: this means run the command as the root (admin) user. Because we are upgrading the packages for every user on the system, we need to run the command as root so that the packages can be installed in the correct place. Use “sudo” in front of any command to run the command as the root user.

  • pacman: this is just running the command pacman, our package manager.

  • -Syu: A combination of -S, -y, and -u.

    • -S: synchronize (install/update) packages with the remote repository. Package manager download packages off of repositories, in this case the Arch Linux repos, but you can add your own custom repos too, so long as they work with Arch Linux.
    • -y: refresh and get a fresh copy of the repository database. This is essentially updating our repo database with the remote repo database.
    • -u: upgrades all packages that are out of date according to the repo database. Because we refreshed the database with the -y command, -u will now compare the currently installed software version with the software version in the database, if it is out of date then pacman will update it.

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:

  • sudo pacman -S “package-name”

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

  • pacman -Ss “part of package name or description”
    • Notice how we don't need root access in this command because we aren't actually installing anything.

Now let's learn how to uninstall a package:

  • sudo pacman -R(sn) “package-name”
    • The “-sn” is optional, it basically means “uninstall package along with all of it's dependencies that aren't needed by other packages.” For example, let's say a software needs 5 dependencies, and when you installed it, you installed 6 packages, the software itself and it's 5 dependencies. When you uninstall the software with just “sudo pacman -R,” it only removes the software, but not the 5 dependencies. With “sudo pacman -Rsn,” it removes the software, along with the 5 dependencies, assuming the dependencies aren't required by any other 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:

  • yay -S “package-name”
    • yay recommends not running yay as root due to permissions issue involving another command makepkg. But don't worry as it will prompt you for the sudo password midway through the installation.

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:

  • yay -R(sn) “package-name”

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.

Welcome to the first post of my blog, the HyperSphere! If you read the description, you'll know that this blog will mainly focus on tutorials and articles relating to privacy/security on Linux. I'll try and keep every article as brief as possible with the minimal amount of required prior knowledge.

Without further ado, let's get right into the first tutorial! Because I'll be writing mainly about doing stuff on Linux, I better teach you how to install and use it.

Linux

You've probably heard of Linux before, whether it was from your computer-addicted friend, or your boomer dad, Linux is everywhere and is the backbone of almost every service that you touch and use. Linux powers some of the world's most important servers and companies, and best of all, it's completely open source and is free of telemetry and spyware (I'm looking at you Windows 10...). Now keep in mind I am referring to the Linux kernel being free of spyware, not the distribution (distro) itself, so that is up to your preference. If you're one of those people that refer to Linux as GNU/Linux, you're probably cringing right now at this article, but that's how I call it and you're gonna have to live with it.

Now time for the distribution that I'll be teaching you how to install:

arch

WAIT DON'T LEAVE YET!!!!

I swear there's a really good reason as to why I recommend Arch Linux as a beginner's first distribution: the AUR.

The Arch User Repository, also known as the AUR, is a community repository of software that is made by Arch users, for Arch users. It extremely simplifies the installation of software because almost all well known software, and even some of the niche ones can be found on the AUR, which eliminates having to build the software from source, which is something a Linux newbie shouldn't have to deal with. Pacman is also an extremely robust package manager, and the Arch Wiki is so extensive and full of knowledge that it applies to other distributions as well, but Arch is the main focus.

Now if you don't want to go through the installation process of Arch Linux, which is probably the only “difficult” thing about Arch, you can choose from a wide selection of Arch-based distros that have a GUI installer and also supports the AUR. My personal favorite used to be Antergos, but that distro was discontinued a few months back but luckily a new one has appeared and it seems to be extremely promising:

endeavour

Now Manjaro is an extremely popular distro that is also based off of Arch, but it uses it's own repository and often comes with a lot of programs, which for some might qualify as bloat. So Endeavour in my opinion gives the most pure and pristine Arch Linux experience without the tedious install process.

Steps to install Endeavour OS:

  1. Go to the official Endeavour website and grab the latest ISO from downloads.
  2. Make a bootable USB device using Rufus, choose your USB from the device list, and choose your ISO for the boot selection. If you run UEFI that supports GPT, then select GPT for Partition Scheme, otherwise use MBR. rufusimg
  3. Now that you have a bootable USB drive, plug it in and restart your PC. You need to bring up the boot device selection screen before your operating system starts, the key differs between motherboard manufacturers and laptops, so do some research. For me personally on a HP Laptop, F9 brings up the boot selection screen. Pressing Escape during booting might pause the booting and give you a list of options too. boot
  4. Now that you have booted into the USB, you should hopefully see a screen that says Endeavour OS with a list of boot options, just choose the first option, or the second if you're not running 64-bit. Now you should be inside a fully working live environment running Endeavour OS.
  5. An installation prompt should've popped up the moment you logged into the environment, and because we're assuming that you're not dual-booting, we're going to let the installer do all the partitioning for us. install Click on the second tab of the prompt, and click “Install Endeavour OS to disk.”
  6. The installation process should be fairly straightforward, for the partitions part of the install, just choose erase disk, and set swap to whatever you want, but normally swap isn't needed; 2-4 GB should be a safe bet. part For the users portion, you can use the same password for both your user account and administrator (root) account, just make sure your password is long and secure! Search up “diceware.”
  7. Continue with the install, and wait for the installation process to finish. Go grab a coffee while you wait. installation process Once the install is done, check “restart now” and click done.
  8. Once the computer boots back up, congratulations! You have now successfully installed a Linux distribution that will most likely be the easiest and most enjoyable distribution you'll ever try.

Now I don't expect you to not meet some hurdles while following this tutorial, and that's good! Meeting obstacles is a fantastic way to learn, and you're gonna meet a lot more the more you go into this vast horizon. The only advice that I can give to you is don't give up, and search engines are your best friend; just don't use Google. Duckduckgo should be good for just about everything.

If you have any questions, feel free to contact me via ways listed on the “contact” blog post.

Next post I'll go into details about how to use Arch and Arch-based distros. I'll talk about the package manager, the AUR, software, and various other things that should be useful.