Getting Started with Arch Linux

We recently asked readers for requests on new articles you’d like to see (and thanks for all the great ideas!). One such request was a beginner’s guide to Arch Linux. As a Linux distro addict, I’ve heard of Arch many times over the years but for some reason, I’d never actually given it a shot. In particular, one aspect that’s always interested me has been Arch’s homegrown package management system, pacman. Today we’ll be finding out what Arch is all about, how to use it, and what makes it special.

About Arch

Arch does not come as a complete, all-in-one pre-built shiny desktop OS. This is on purpose. The idea behind Arch is that upon installation, you’ve got a fast, light, minimal OS to use as the base to make your own shiny desktop. If you don’t like the idea of putting together your own version of what Linux should be like, then Arch may not be for you.

Installation

The Arch website provides torrent links here. The FTP ISO is the “netinstall” version, where packages are downloaded as needed during the install. The Core ISOs include the core packages on the disc, so that you can complete an install without a working internet connection. Download whichever you like, and burn to CD to begin the install. I’ll be using the FTP ISO for this article. That’s the recommended method, as it will download the newest available versions of all packages, instead of installing old ones from the CD which must be upgraded later.

Once you boot the CD, you can begin the installation process by entering

/arch/setup

at the command prompt. You’ll be taken to a text-based installer. Most of the installer should be fairly easy to navigate for an experienced Linux user (Arch’s target audience, and therefore the target audience of this article) so I won’t cover the installation in much detail. The Arch website offers a comprehensive install guide that you can use if you run into any trouble. I will, however, include some screenshots of the installer so you can see what you’re getting in to.

Package Management

Once the install is complete, it’s likely the first thing you’ll want to do is install some new packages (like Xorg and a desktop environment). First, let’s make sure pacman is aware of all the available packages. By default, it will use whatever mirror you chose during installation. To tell pacman to refresh that list, enter

pacman -Sy

If you have any problems with that, try changing the mirror by editing /etc/pacman.d/mirrorlist. Comment out your current mirror and choose another from your region. Make sure that you see extra in the sync. That’s where you’ll find many of your common packages. If all went well, you’re ready to install some packages. The command to do that is

System Config

Before starting X, there are a few things left to take care of. You may have noticed that the install never called for a non-root user to be created. Now’s a good time to create that user manually, and install some other useful apps like sudo.

There are a few packages you’ll probably want to install before starting X.

xf86-input-keyboard

xf86-input-mouse

hwdetect

xf86-video-(your video card type)

Finally, generate an X.org config by running

X -configure

and copy the resulting config to /etc/X11/xorg.conf.

Also, it’s quite possible that you’ll need to tell X to load your desktop of choice by entering that executable into your new user’s .xinitrc file. On mine, for example, I had to include

exec wmaker

Optional

Arch has a tool called hwd that does a great job of detecting hardware and configuring X. It’s part of a group of packages called AUR, which are unofficial and created by users. Unfortunately, getting AUR packages set up can be a rather complicated process. There’s a useful tool called aurbuild that makes the process much simpler, but that too is also an AUR package itself, so it’s kind of a chicken-and-egg situation. I’ll list out the process for acquiring aurbuild as well as I can here, but I make no promises as to whether or not it will work.

If I’ve missed any steps, please let me know in the comments and I’ll update this section.

Conclusion

It’s hard to come up with an opinion about Arch, since Arch is what you make of it. I like that it gives so much control to the user when it comes to system configuration, but at times it feels like a little too much control. There are a few things that make you think “come on, does this HAVE to be manual?” but the developers are clearly just trying to follow the Arch philosophy of giving the user all the control. In particular, it would be nice to have tools like hwd and aurbuild as part of the system, or at least available for installation through pacman. That may happen at some point as packages in AUR have a chance to be worked into the community repo eventually. Overall I think I like Arch and pacman, and I can see how it would make a great choice for systems that should be kept fast and clean.

Similar Articles

15 comments

secdroidsays

Nice article. I use Debian and Arch, formerly Ubuntu.

Arch is really worth the effort. Not nearly as hard as beginners think, but there is a bit of a learning curve. I’d encourage anyone to experiment if they have a spare test partition, virtual machine, or test box. Very rewarding!

Nice article. I am using archlinux for almost 2 years now. I couldn’t thing another distro to match archlinux. Installing packages from both main and aur is much easier using yaourt. There is package called yaourt which is a wrapper for pacmanhttp://wiki.archlinux.org/index.php/Yaourt

Regarding aur packages: You do not have to use any of those tools.. Just search for the package at aur.archlinux.org – install any dependencies that happen to also be AUR packages (just follow the same procedure for those as well) –

then make a builds folder (i just have it in ~)

$ mkdir ~/builds

then cd to builds and wget the tar.gz from the package you found at aur.archlinux.org

then tar xvzf it out and cd to the directory it created..

then take a look at the PKGBUILD and make sure there’s nothing nasty in it.. then run makepkg (note – you need sudo capabilities; it will look and install any needed dependencies that are in the regular repos)

$ makepkg -si ===> (-si will install the package after it get built into the tar.gz; otherwise you will need to pacman -U builtpackage.tar.gz as root or via sudo)

And you are done… many archers do it this way and don’t use yaourt or similar tools (Although I’ve heard one called Slurpy is quite excellent)

I miss a beginner guide how to recover Arch Linux after kernel upgrade that result in kernel panic during boot. This happened to my notebook without CD-ROM drive last month, several months after installation of ArchLinux to my notebook. Netebook doesn’t boot after kernel upgrade boot finish with panic error that stack corruption was detected. I realised it is not easy to recover my notebook, I give up with ArchLinux after this incident at my notebook. Next time I will save “working kernel and initrd” to save place…

I remember myself proposing the idea for an Arch Linux setup guide a few weeks ago for a googlewave invitation! Since I saw many great ideas about new articles proposed as well by other readers, I wasn’t expecting you to deal with Arch so quickly! :) :)

The guide is awesome! It helped me with some questions that I had and clarified some things that I was doing without understanding!….. I have managed to install Arch several times in virtual machines, however never tried it on a real pc. Of course, main phobia behind this, is my fear that I won’t be able to easily deal with hardware compatibility problems that may occur – therefore my usual -failsafe- option is Ubuntu or Mint.

Even so, every time I install Ubuntu, I choose the Minimal CD (I found the concept of installation pretty much the same with Arch’s)… I will spend some time with Arch in real life, now that I am more familiar with command line and Linux’s concept!