Arch Linux Basics

From RHLUG Wiki
Jump to: navigation, search

Note: This page is currently under construction and is incomplete.

Ready to get into Arch Linux from your jump from Ubuntu or Debian? This tutorial should help!

Want to install Arch Linux quickly and worry about customization later? Use an installer like Anarchy Linux, or a similar distribution based on Arch such as Antergos or Manjaro.

Differences in package management

Arch Linux compared to Ubuntu is a rolling release distribution, which means quicker updates and no set releases (like Ubuntu LTS). The ISOs (image files) are the ones that are distributed as "versions" on the website and are updated regularly. (In other words) For example, you could download the 2018.03.01 ISO and install it while installing the newest packages, but this does not mean your system is running on Arch Linux 2018.03.01. It is running Arch Linux with whatever you have installed, compared to Ubuntu with a specific release number (16.04 LTS). This means your installation is more flexible and has more regular updates, but less jumps to the next version.

Manjaro (a derivative of Arch Linux, i.e. distro based off of Arch Linux) has packages that are more stable than Arch (Arch is bleeding-edge and gets updates on nearly the same days). You can switch to the testing branch or install Arch packages from their repositories early (sometimes with some errors!) if you decide a package is too old. With Ubuntu, this would generally be done differently, either by adding a PPA (personal package archive) repository (which can become outdated and config files would have to be updated more often), or by running a .deb file locally (which can take up more space than an Arch Linux package file, which only contains the description of what commands are needed to install the package).

This is very important to note when you are planning to install Arch as a daily driver (daily-use system) and need the newest software.

In short, you will be using a different package manager called pacman instead of apt-get or apt. It is useful frequently when managing your system and is how Arch Linux is centered around (a different update system). You will learn a lot about internals of the system. You may experience major or minor issues, that's okay, ask for help in the Telegram group, or look up your error. You never know when you'll find something useful! Good luck on your journey looking into the OS and having a fully customizable system!

If you feel Arch isn't for you, don't worry. It is just another distro and you can use whatever you like. For some of us we feel it's a good introduction into tweaking the OS because it's very different in how it works. For this reason, we generally don't recommend Arch as a first distro (but Manjaro might be accessible enough.) We would usually recommend Ubuntu/Debian because of a workflow that's generally more user friendly and adaptable. (If you want to use Arch for your first distro, go ahead! I recommend to read the installation guide so you don't get stuck knowing which command to use.)

Useful links

The Arch Wiki has a lot of useful information that is usually written in a concise tutorial style. It can generally be used as a guide to other distributions of Linux for specific troubleshooting/software errors/commands (except for package installation and setup which Ubuntu/other distros differ in).

Arch Linux's stance on system maintenance for keeping a system up to date (you can follow your own setup, but you may experience more issues depending on the situation): https://wiki.archlinux.org/index.php/System_maintenance

General tips on using Linux (a lot of useful links and Linux knowledge for learning the internals of the system are located here): https://wiki.archlinux.org/index.php/General_recommendations

Useful commands

Pacman

sudo pacman -Syu: updates the system (HIGHLY RECOMMENDED to make sure to do this BEFORE installing/updating a new or already installed package - see "partial upgrades are not supported" on Archwiki. It will become second nature once you do it often. Auto updates generally break your system on occasion (and output from console is helpful when updating packages) so they're not recommended.)

sudo pacman -S [package]: installs a specific package

sudo pacman -R [package]: removes a specific package

sudo pacman -Rs [package]: removes a specific package AND ALL of its dependencies (be careful! important ones might also get removed! Look at the package list FIRST. Google a specific package if you're stuck and look at the "depends on"/"required by" parts in arch linux's package browser (to see what packages may have been removed by accident). Generally you can just reinstall the packages if they're deleted. No config files will be deleted (arch linux's design keeps customization intact) so you're generally safe, it's just a bit more. Usually you would want to remove the packages you recently remember installing. I rarely use this command myself.)


sudo rm -rf /var/lib/pacman/sync/*: removes package cache files. You will need to redownload them using sudo pacman -S or when installing a package, use sudo pacman -S [package]. This happens when you either get an unreliable or blocked network connection that you can't connect to the Arch repos properly (e.g. in an airport, or any other paid/restricted internet connection, or while stuck in a captive portal webpage) and the package files become corrupt.


sudo pacman -U [package file with .tar.xz]: installs a downloaded .tar.xz package from arch package repositories (instructions needed - from package browser on arch linux website --> download snapshot button (AUR)/download from mirror (package browser)). Can also reinstall downloaded local packages from /var/cache/pacman/pkg. (use cd to go to this directory.)