Sie sind auf Seite 1von 34

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

RELATED

(http://lifehacker.com (http://lifehacker.com (http://lifehacker.com (http://lifehacker.com (http://lifehacker.com (http://lifehacker.com /5762081 /5840175 /5878056 /5890978 /5714348 /5904069 /wtf-desktop- /how-do/try-a/rst/most/veenvironments- i-getnew-operating- look-atpopularbest-linuxgnomecool-desktop- systemubuntulinuxdistributions) kde-andeectsthis-weekend) linuxdownloadsFive Best more-explained) in-linux) 1204-precise- and-postsTry a New Linux pangolin) of-2010)

WTF How Do I Operating Distributions First Look Most Desktop Get Cool System (http://lifehacker.co at Ubuntu Popular Environments: Desktop This /5904069 Linux Linux GNOME, Eects in Weekend /ve12.04 Downloads KDE, and Linux? (http://lifehacker.com best-linux"Precise and Posts More (http://lifehacker.com /5878056 distributions) Pangolin" of 2010 Explained /5840175 /try-a(http://lifehacker.com (http://lifehacker.com /how-donew-operating- (http://lifehacker.com /5890978 /5714348 /5762081 i-getsystem/most/wtf-desktop- cool-desktop- this-weekend) /rstlook-atpopularenvironments- eectsubuntulinuxgnomein-linux) linuxdownloadskde-and1204-preciseand-postsmore-explained) pangolin) of-2010)

L 0 annotations

Hide

WHITSON
1 of 34 08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

HOW T

GORDON ( P 649 reading: Grab 2 Fr HTTP://WH ITSONGOR DON.KINJ A.COM)


12/06/12 8:00am (http://lifehacker.com /5680453/builda-killercustomizedarch-linuxinstallationand-learnall-about-linuxin-the-process) (http://lifehacker.com /5680453/builda-killer-customizedarch-linuxinstallationand-learn-all-aboutlinux-in-the-process)

g 652,116

L 56 (http://lifehacker.com /5680453/builda-killer-customizedarch-linuxinstallationand-learn-all-aboutlinux-in-theprocess#replies)
Like 1.5k

Build a Killer Customized Arch Linux Login S e (/posts/new) Installation (and Learn All About Linux in the Process) (http://lifehacker.com /5680453/build-a-killercustomized-arch-linuxinstallation-and-learnall-about-linux-in-theprocess)
Don't like Windows 8's new interface (http://lifehacker.com /5955229/why-does-everyone-hate-windows-8-shouldi-upgrade)? Sick of Ubuntu Unity and the new ads that come along with it (http://lifehacker.com/5952845/whats-new-inubuntu-linux-1210-quantal-quetzal)? Maybe it's time to create your own, ideal operating system with just the features you want. Arch Linux can make it happen: it lets you build your own personal, killer Linux distro from the ground up.

Ads by Google (http://www.google.com /url?ct=abg&q=https: //www.google.com /adsense/support /bin/request.py%3Fcontact%3Dabg_a //lifehacker.com /5680453/build-a-killercustomized-arch-linuxinstallation-and-learnall-about-linux-in-theprocess%26gl%3DFI%26hl%3Den%2 pub-0457527031304647%26ai0%3DC dwCoAGb14DuA8gBAagDAaoEwAFP sXUVPAo2GbYmogmELoIH7B0agwjM MTJh51qSIBgGAB82o_xE& usg=AFQjCNECqbaQDcVFTcifRhGqtqnTVn3UA

Ticketing Software System


2 of 34 08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

649 reading: Grab 2 Fr /pagead/aclk?sa=L&

(http://www.googleadservices.com

ai=CrGmpjar6UeXpLOzAyAP86YHADcGnwowEydPVnlfAjbcBEAE dwCoAGb14DuA8gBAagDAaoEwAFP0LXKurcKHZzdWsYRbvn1VF S e (/posts/new) Login sXUVPAo2GbYmogmELoIH7B0agwjMg6hUSCLDNUeImEbvBpccC MTJh51qSIBgGAB82o_xE& num=1& cid=5GjSyQQORf1b1H0atCCvSAv&sig=AOD64_0C0fZeSk1a7Qk1v_krLwTo_ugZcA& client=capub-0457527031304647& adurl=http: //www.zendesk.com /%3Futm_source%3Dgoogle%26utm_medium%3Dtextdisplay%26utm_content%3Dtext_ad_RCH%26utm_campaign%3D EMEA-Managed1) Try Zendesk for free. Support tools for all Hooray www.zendesk.com (http://www.googleadservices.com /pagead/aclk?sa=L& ai=CrGmpjar6UeXpLOzAyAP86YHADcGnwowEydPVnlfAjbcBEAE dwCoAGb14DuA8gBAagDAaoEwAFP0LXKurcKHZzdWsYRbvn1VF sXUVPAo2GbYmogmELoIH7B0agwjMg6hUSCLDNUeImEbvBpccC MTJh51qSIBgGAB82o_xE& num=1& cid=5GjSyQQORf1b1H0atCCvSAv&sig=AOD64_0C0fZeSk1a7Qk1v_krLwTo_ugZcA& client=capub-0457527031304647& adurl=http: //www.zendesk.com /%3Futm_source%3Dgoogle%26utm_medium%3Dtextdisplay%26utm_content%3Dtext_ad_RCH%26utm_campaign%3D EMEA-Managed1)
RELATED

Why Does Everyone Hate Windows 8? Should I Upgrade?

What's New In Ubuntu Linux 12.10 Quantal Quetzal

(http://lifehacker.com /5955229/why-doeseveryone-hate-windows8-should-i-upgrade)

(http://lifehacker.com /5952845/whats-new-inubuntu-linux08/01/2013 09:33 PM

3 of 34

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

Dear Lifehacker, Windows 8 1210-quantal-quetzal) 649 reading: Grab 2 Fr P is out, and it's all anyone's Ubuntu released the next talking aboutexcept iteration of your favorite everyone just keeps telling Linux distribution today, me how much it sucks and codenamed "Quantal how I Read Quetzal." Here's what (http://lifehacker.com you'll Read /5955229/why-does(http://lifehacker.com everyone-hate-windows/5952845/whats-new-in8-should-i-upgrade) ubuntu-linux-1210-quantalquetzal)

(/posts/new)

Login

If this article looks familiar, it's because we've posted it before! However, Arch recently changed its installation process quite a bit, making our old guide outdated. Due to the popularity of this guide, we've updated it to work with Arch's new process, so we can all keep getting our Arch x (and hopefully introduce a few new users to the OS of their dreams). Here's why you may want to use Arch Linux, followed by how to set it up.

Who Is Arch Linux Good For?


Linux is popular for a number of reasons, but high on that list is the fact that, with Linux, you have a lot more power to tweak your OS to your liking. You also have the opportunity to learn more about the way computers and operating systems work. While Ubuntu certainly ts this bill (when compared with Windows or Mac OS), intermediate Linux users may be itching to try something new. Arch Linux is a great distribution for intermediate users looking to dig into Linux a bit more and essentially roll your own fast, stable, super-personalized distro.

4 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

The key part of this

649 reading: Grab 2 Fr

RELATED

explanation is "intermediate users." Arch Linux is not for Linux beginners; there's a lot of manual conguration and command line work involved that Linux rookies probably aren't comfortable with. If you are a rookie, that's awesomewelcome to the wonderful world of Linuxbut you won't want to start here. Check out our guide to getting started with Linux rst (http://lifehacker.com /5778882/getting-startedwith-linux-the-completeguide), and when you've used something like Ubuntu (http://www.ubuntu.com/) or Mint (http://linuxmint.com/) for awhile, come on back here for some serious Linux action. If you're familiar with

Getting Started with Linux: The Complete Guide

(/posts/new)

Login

(http://lifehacker.com /5778882/gettingstarted-with-linuxthe-complete-guide)
If you've been meaning to try out Linux but felt too overwhelmed, we've got all the info you need to get started. Here are our ve lessons Read (http://lifehacker.com /5778882/getting-startedwith-linux-the-completeguide)

something like Ubuntu and are comfortable with the basic ideas of command line work and conguration les, read on, because Arch Linux is a great next step. This guide has two parts. The rst half describes the philosophy behind Arch Linux and its benets as a distro, while the second part is a (very simplied) guide on setting up your rst Arch install. I won't go through some of the more basic explanations since, as Linux users, you probably know how to burn an ISO image to CD (http://lifehacker.com/5139424/how-to-burn-isosin-windows-7), what the dierence between 32- and 64-bit operating systems is (http://lifehacker.com/5431284 /the-lifehacker-guide-to-64+bit-vs-32+bit-operating-systems), and so on.
RELATED

How to

The

5 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

Burn ISOs Lifehacker 649 reading: Grab 2 Fr to P in Windows Guide 7 64-bit vs. 32-bit Operating Systems (http://lifehacker.com /5139424/how-toburn-isos-in-windows-7)
Good news for Windows users looking to burn a quick ISO disk image to a CD or DVD: Windows 7 supports dead simple burning of ISOs. Read (http://lifehacker.com /5139424/how-to-burn-isosin-windows-7)

(/posts/new)

Login

(http://lifehacker.com /5431284 /the-lifehacker-guideto-64+bit-vs-32+bitoperating-systems)


You're probably aware that 64-bit and 32-bit versions of your operating system exist, but apart from ascribing to a bigger-is-better philosophy, Read (http://lifehacker.com /5431284/the-lifehackerguide-to-64+bit-vs-32+bitoperating-systems)

Bear in mind that while this guide should get you started, this is by no means a one-stop-shop for all Arch Linux knowledge. I highly, highly recommend you also browse the Arch Linux Wiki (https://wiki.archlinux.org/index.php/Main_Page), especially the Beginner's Guide (https://wiki.archlinux.org/index.php /Beginners%27_Guide), before you actually begin. The forums (http://bbs.archlinux.org/) are also a great source of info, so check them out as well. If you just follow the steps in this guide and go "ta-dah!", you'll miss the point of what Arch Linux has to oer. The Beginner's Guide can be a bit overwhelming, since it incorporates so many dierent possibilities that many rsttimers won't deal with, so I've created this guide to inspire you and help show you that it isn't as nerve-racking as it may seembut you'll still want to use multiple resources when you go to install your system.

Why Arch Linux?

6 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

649 reading: Grab 2 Fr

(/posts/new)

Login

As Arch is denitely not for Linux beginners, you may be wondering what its advantages are. While it's pretty popular among developers and the like, it's also pretty popular among general tweakers and geeks that like to really get at the nuts and bolts of a system. If you've been a Linux user for a little while and you'd love to get a bit deeper and learn about how it worksso you can more properly and openly congure it to work for youArch is the perfect next step in your journey. The philosophy behind Arch is what's known as The Arch Way (https://wiki.archlinux.org/index.php/The_Arch_Way): simplicity at its nest. Specically, Arch aims to be an ecient, user-centric, open, elegantly coded distribution that doesn't sacrice anything for convenience. That is, when faced with a choice between more ecient code and a simpler experience for the average computer user, Arch will always choose the former. However, while this may seem like a burden to some, it's actually one of Arch's biggest advantages. Instead of conguring the distribution to be idiot-proof, Arch forces you (politely) to learn what each conguration le and important terminal command does early on. Thus, when something breaks or when you want to congure something beyond what KDE or GNOME has options for, you pretty much already know where to go and what to do. Note that I'm not trying to say that idiot-proong is a bad thing. In fact, being simple to use is one of the best characteristics a modern OS can havefor the average PC user. Once again, this guide is not for those people. This is for those of us that love tinkering with our operating system's insides.

7 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

Why, as an Ubuntu User, You Grab 2 Fr May P 649 reading: Want to Switch
Of course, if you're already a Linux user, you're probably pretty happy with all the options your distro of choice gives you. Here's what Arch really oers that makes it worth trying.

(/posts/new)

Login

You'll Know What's Really Going on Behind the Scenes


For the record, I like Ubuntu. It's easy to install, works out of the box on tons of hardware, and has actually made some interesting innovations on the desktop (http://lifehacker.com /5890978/rst-look-atubuntu-linux-1204-precisepangolin) (whether you love or hate Unity as a whole). I've also used it to repurpose some old PCs for my mother around the house and it's easy enough for even non-geeks to use. If you use Linux solely because it's free, open, and easy to use, you don't need to complicate your life for no reason. However, if you've used Linux for a little while and would like to take the next step, Arch is where you want to go. While Ubuntu works out of the box with a lot of computers, and provides a lot of user-friendly conguration for certain things, it's a nightmare to congure for others. It provides no way of teaching you where the correct cong les are for your eighty button mouse or your three monitor setup, and I hate to say it, but in my experience the Ubuntu forums have been less than helpful. Again, not to hate, but that's just what I've
RELATED

First Look at Ubuntu Linux 12.04 "Precise Pangolin"

(http://lifehacker.com /5890978/rst-look-atubuntu-linux1204-precise-pangolin)
Ubuntu 12.04 "Precise Pangolin" is out today, bringing lots of improvements to your favorite Linux distribution. It has a new quick search Read (http://lifehacker.com /5890978/ rst-look-atubuntu-linux-1204-precisepangolin)

8 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

experienced.

649 reading: Grab 2 Fr

(/posts/new)

Login

EXPAND

Arch's installation doesn't really have a graphical interface. It's mostly done through the command line, and consists of you using a guide like this and the fabulous Arch Wiki to partition your drive, install a minimal base system, and go through each command and conguration le to get things set up, and you'll know how the base system works. That way, down the road, when you want to automatically mount another hard drive when Arch boots, you'll know you need to add something to the
options

column of
/etc/fstab

, and you won't be intimidated by that fact. And, when you don't know what to do, Arch has one of the best documentations and communities I've ever seen.

You'll Always Have the Newest Software


Unlike other popular operating systems, Arch doesn't have a big update every two years, one year, or even six monthsArch updates whatever it wants, whenever it wants, which means you're constantly on the bleeding edge of both the OS and the software you use.

9 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

649 reading: Grab 2 Fr

(/posts/new)

Login

Note that in this instance, "bleeding edge" does not mean "ridiculously unstable". Lots of testing goes into these packages before they get added to the repositories, and you aren't going to nd your PC crashing every day because you're always getting the newest updates. What it really means is that you'll get software updates as soon as they're ready to use, not as soon as Ubuntu gets around to updating their repositories. If Thunderbird releases an update, you'll get that update the next daynot the next month.

You Build a Killer Operating System that Fits Your Needs and Wants

Since you start o with a minimal install and build up from there, you won't have any unnecessary packages bloating up your system. You have complete control over everything that goes into your setup, and you can make it as small and minimalistic or as big and powerful as you wantyou essentially build your own, fast, stable, super-customized Linux distro from the ground up. And who wouldn't love that?

How to Install Arch Linux


If all this sounds like your dream come true, then it's time to move on to the next step: actually installing Arch. While the Arch Wiki has a great Beginner's Guide (https://wiki.archlinux.org/index.php/Beginners'_Guide) (have I mentioned that you should read it?), I found I still ran into a few hiccups along the way, and the wiki is so full of (great) information that it can be a bit overwhelming for an Arch rsttimer. For example, the beginner's guide goes through lots of

10 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

dierent possible situationsi.e., if you're using a static IP , if you require wireless internet from the get-go, etc. Instead of trying to sift through all that and ignore the more advanced stu that may not apply to you, I've created this guide that should get you up and running without your brain exploding. This guide contains the methods I found work best and were easiest for me, and they should work with most PC builds without a problem. If you do run into any problems, or have any specic needs that aren't fullled by this guide (like if you are using a static IP), you can probably nd more detail in the corresponding section of Arch's Beginner's Guide, so head over there when necessary.

649 reading: Grab 2 Fr

(/posts/new)

Login

Step One: Get Yourself an Arch Linux Install CD


You can install Arch many dierent ways, but we're going to use your basic CD installation. If you don't have an optical drive, you can always install it from a USB ash drive (https://wiki.archlinux.org/index.php /Install_from_a_USB_ash_drive), too. Head over to the Arch download page (http://www.archlinux.org/download/), download the Arch Linux ISO, and burn it to your installation medium of choice before you continue.

Step Two: Set Up Your Partitions


While you could always partition your drive from the Arch Linux installation CD, it's much easier to do from a Linux Live CD like Ubuntu (http://www.ubuntu.com/) or GParted (http://gparted.sourceforge.net/livecd.php), which you probably already have (because you're no Linux slouch!). Assuming you already know how to partition drives, go ahead and make one for your OS (around 15GB is safe) and one for all your documents and apps (which can be as big as you want). If you use an SSD, you can just make one partition on the SSD for your boot drive and one on a bigger HDD for your les. You can also make a nice 1GB swap partition for good measure, but if you have a lot of RAM, this probably isn't necessary. Format them as ext4, and note the names of the two you'll be using (i.e.

11 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

/dev/sda1

649 reading: Grab 2 Fr

as the OS partition and


/dev/sda2

(/posts/new)

Login

as your data partition), as that's how you'll have to refer to the partitions during the install process. Now that you've created your partitions, boot up from your newly-burned Arch Installation CD and choose "Start Arch Linux" at the prompt. Make sure you choose the right architecture for your CPU (http://lifehacker.com/5431284 /the-lifehacker-guide-to-64+bit-vs-32+bit-operating-systems) (32-bit or i686 vs 64-bit or x86-64). When it nishes booting, you'll get a command line prompt.

Start by seeing if you have an active internet connection. I recommend plugging your computer in via Ethernet, since that'll make installation a lot easier, even if you plan on using Wi-Fi later. To see if you have a connection, just ping Google with the following command:

ping -c 3 www.google.com
If you get an error that says
unknown host

or anything like that, you'll need to set up your network

12 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

manually (https://wiki.archlinux.org/index.php /Beginners%27_Guide#Wired).

649 reading: Grab 2 Fr

Next, mount those partitions you just created. If you aren't sure the names of your partitions, run the following command:

(/posts/new)

Login

fdisk -l
You'll see a list of your drives and partitions, with the same names we saw before (like
/dev/sda1

. Make note of the partition(s) you want to use for Arch.

Again, we're using two partitions hereone for the OS and one for our personal les. So, we're going to need to mount them as such. Mount your drives using the following commands:

mkdir /mnt mount /dev/sda1 /mnt mkdir /mnt/home mount /dev/sda2 /mnt/home

13 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

In this example,
/dev/sda1

649 reading: Grab 2 Fr

(/posts/new)

Login

is our root partition for the OS, while


/dev/sda2

is our home partition for our les. The last thing you need to do before starting is select a mirror for downloading your packages. Run:

nano /etc/pacman.d/mirrorlist
Scroll down to your preferred mirror (the closer to your location the better), press Alt+6 to copy the line, then scroll back up and press Ctrl+U to paste that line at the top of the list. US users should already have a good server at the top of the list. When you're done, press Ctrl+X to exit, and save with Y and Enter if you made any changes.

Step Three: Install the Arch Base System


Now it's time to start the installation. You can do so with the following command:

pacstrap -i /mnt base


If you want to tweak any packages during the process, you can do so when prompted, but the default settings should be ne.

14 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

Next, you'll need to create and edit some cong les. Here are the ones you want to worry about:

649 reading: Grab 2 Fr

/etc/fstab: Fstab stands for File Systems Table. This le lists your available drives and partitions and decides how you'll use each one. To create one for your drive, just run:

(/posts/new)

Login

genfstab -U -p /mnt >> /mnt/etc/fstab


You can then view and edit it with:

nano /mnt/etc/fstab
The columns, in order from left to right, list the drive's name(s) and UUID, mount point, le system, and boot options. You probably won't have to do anything here at the moment, but if you have a lot of partitions on your drive, you'll probably nd yourself back here soon. You may also want to clean up the columns a little bit so they line up better, but that's up to you. Check out the Fstab wiki entry (https://wiki.archlinux.org /index.php/Fstab) for more information.

/etc/locale.gen: This le determines certain location-based settings, like time and date formats, alphabetic tweaks, and other things. For this and the other conguration les, we'll need to
chroot

into our newly-created system. Essentially, we'll be running a terminal on that system without having booted into it yet. To do this, just run:

15 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

arch-chroot /mnt
Next, create the
locale

649 reading: Grab 2 Fr

(/posts/new)

Login

les by running:

nano /etc/locale.gen
By default, everything has been commented out with a
#

, but you can scroll down and uncomment the line for your locale(s) by deleting the
#

symbol. For example, US users would uncomment the


en_US.UTF-8

line. Again, press Ctrl+X to exit, then Y and Enter to save it.

You should also create a


locale.conf

le with the following command (for English-speaking US

16 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

users):

649 reading: Grab 2 Fr

echo LANG=en_US.UTF-8 > /etc/locale.conf export LANG=en_US.UTF-8


If you speak another language, tweak this command accordingly. Time Zone and Clock: Next, we'll set our time zone. To view the available zones, run the following command:

(/posts/new)

Login

ls /usr/share/zoneinfo
You can view sub-zones by picking a category and running:

ls /usr/share/zoneinfo/America

Find the zone you want, then run the following command, replacing
America/Los_Angeles

with your time zone:

ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
Then, set the clock according to your chosen zone with:

hwclock systohc utc


That's all you should need for now in the realm of miscellaneous conguration les. The next few steps will be a tad more pointed.

Step Four: Set Up Your Network

17 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

At this point, you have network access from the live CD, but you'll need to set up your network for the actual Arch installation. If you have a wired connection, with a dynamic IP address, all you need to do is enable the wired networking service on your new setup. To enable a background service like this one, you'll need to use the
systemctl

649 reading: Grab 2 Fr

(/posts/new)

Login

command. In this case, run:

systemctl enable dhcpcd@eth0.service


If you connect using Wi-Fi, you'll need to install a few packages rst. To start, install Arch's wireless tools with:

pacman -S wireless_tools wpa_supplicant wpa_actiond dialog


Then, run the following to connect to your network:

wi-menu
This will create a prole in
/etc/network.d

named after your network. Lastly, enable the wireless service with
systemctl

systemctl enable net-auto-wireless.service


Now, your network should be all set up and ready to go when you nish installing Arch.

Step Five: Congure Your Package Manager


Arch Linux uses a package manager called Pacman, and it's pretty darn awesome. Before you can use it in your new

18 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

installation though, you'll need to do a few things. Start by editing its conguration le with:

649 reading: Grab 2 Fr

nano /etc/pacman.conf
Scroll down to the "Repositories" section. The
[core]

(/posts/new)

Login

,
[extra]

, and
[community]

repositories should already be uncommented, but if you're on a 64-bit machine, you should also enable the [multilib] repository, which lets you install both 64- and 32-bit programs. To do so, add the following lines to the bottom of the cong le:

[multilib] Include = /etc/pacman.d/mirrorlist


If you're on a 32-bit system, you shouldn't need to edit anything in here right now, but it's a good idea to take a look around, since this is where you'll add any extra repositories in the future. When you're done, go ahead and exit, saving any changes you might have made.

19 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

When you're done, run the following command to refresh your repository list (if you made any changes):

649 reading: Grab 2 Fr

pacman -Sy
We'll talk more about how to use Pacman in a little bit. For now, head to the next step.

(/posts/new)

Login

Step Six: Create a User Account


Now it's time for a few nishing touches before we actually boot into our Arch system. First, set the root password by running:

passwd
Type in your desired password when prompted. Now, as an intermediate Linux user, you already know you don't want to use the root account for regular computing, since that can be dangerous. So, create a user account (and a password) for yourself by running:

useradd -m -g users -G wheel,storage,power -s /bin/bash johndoe passwd johndoe


Of course, replace
johndoe

with your desired username. The string of comma-separated terms contains the groups to which your user belongs. The ones listed should be ne, though they aren't the only ones available. If you have a oppy drive or scanner, for example, you'll want to add
floppy

and/or
scanner

to the list. For a full list, check out the Groups wiki entry (https://wiki.archlinux.org/index.php/Groups).

20 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

Now would probably be a good time to install

649 reading: Grab 2 Fr

sudo

(/posts/new)

Login

too, so your new user can perform administrative tasks. To do this, use the aforementioned Pacman package manager:

pacman -S sudo
That's how easy adding a package is in Pacman. If you wanted to see a list of packages pertaining to a search term, you could type:

pacman -Ss sudo


This would search the repositories for "sudo", returning to you a list of packages containing that name. Of course, you could also search the database on Arch Linux's web site (http://www.archlinux.org/packages/). Once you've installed
sudo

, you can allow your new user to run it by editing your sudoers le:

EDITOR=nano visudo
Scroll down until you nd this line and uncomment it:

%wheel ALL=(ALL) ALL


Save the document and exit the editor. This tweak will allow all members of the
wheel

groupto which your new user belongsto use


sudo

, which will be handy when you nally boot into our new OS.

21 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

649 reading: Grab 2 Fr

(/posts/new)

Login

Step 7: Install Your Bootloader


Next, you'll need to install a bootloader that can boot you into your Arch installation. For this guide, we'll be using the ever-popular GRUB, though you can use something else if you desire (https://wiki.archlinux.org/index.php /Beginners%27_Guide#Install_and_congure_a_bootloader). If you're installing Arch on a UEFI-based motherboard (instead of a BIOS-based motherboard) or if you're dual-booting, you may want to do some extra reading (https://wiki.archlinux.org /index.php /Beginners%27_Guide#Install_and_congure_a_bootloader) before continuing, as everyone's setup is going to be a little dierent. To install GRUB, run the following commands, replacing
/dev/sda

with the drive (not the partition,


/dev/sda1

) that holds your Arch Linux installation:

pacman -S grub-bios grub-install target=i386-pc recheck /dev/sda cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo


If you're dual booting, run the following:

22 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

pacman -S os-prober

Then, whether you're dual-booting or not, run:

649 reading: Grab 2 Fr

grub-mkcong -o /boot/grub/grub.cfg
This will create a cong le for your bootloader (which you can edit if you want dierent options when booting into Arch or another OS). Lastly, exit from chroot, unmount your partitions, and reboot your computer:

(/posts/new)

Login

exit umount /mnt/home umount /mnt reboot


Obviously, if you mounted other partitions at any point, include them in the commands above. You should also remove your Arch Linux Installation CD at this time.

Step Eight: Get Your Desktop Up and Running


When you reboot, you should nd yourself at a simple login prompt, just like when you rst started. However, this time, you're actually logging into your new Arch installation! You now have a very basic system from which you can build up a working desktop with sound, video, and more. To start, let's get sound up and running. To do this, you need to install
alsa-utils

with the following command:

sudo pacman -S alsa-utils


Then, start up alsamixer:

alsamixer
All your channels will start muted, so use the M key to unmute the channels you need. Then, use the arrow keys to turn them up or down. You'll denitely want to unmute the Master channel, and the PCM channel if you have one. Depending on

23 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

your speaker setup, you may also need to unmute others like Front Speaker or Headphone. Raise their volume up until "dB gain" equals "0" for each. This will ensure that you don't get any sound distortion. Press ESC when you're done.

649 reading: Grab 2 Fr

(/posts/new)

Login

To check and make sure your speakers are working, just run:

speaker-test -c 2
Change
2

to the number of speakers you have (for example,


8

if you have a 7.1 surround system). If you hear the static it generates, you've got working audio! If not, head back to
alsamixer

and try tweaking your channels to make sure everything's properly unmuted. To stop the speaker test, press Ctrl+C. Next, it's time to get some graphics up and running. First, we'll install the X window system with:

24 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

sudo pacman -S xorg-server xorg-xinit xorg-server-utils P 649 reading: Grab 2 Fr


If you want 3D support, you'll also want to install
mesa

(/posts/new)

Login

sudo pacman -S mesa


Now comes what, in my experience, is always the most troublesome part of a Linux installation: video drivers and conguring X. The video driver you need will depend on your graphics card and what you want to get from it, so see the corresponding entry in the Beginner's guide (https://wiki.archlinux.org/index.php /Beginners%27_Guide#Install_a_video_driver) for more information. You'll use Pacman to install those drivers, a process with which you're probably familiar. For example, if I wanted to install the proprietary NVIDIA drivers on a 64-bit system, I'd run:

sudo pacman -S nvidia lib32-nvidia-utils


Again, your commands will dier. Do some research to nd out what drivers you need. Most desktop computers should be able to use their mouse and keyboard out of the box. If you're on a laptop, though, you should take this time to install some drivers for your trackpad:

sudo pacman -S xf86-input-synaptics


We're in the home stretch! Biw it's time to see if you can get a graphical environment up and running. First, install the default environment:

pacman -S xorg-twm xorg-xclock xterm


Then, to test X, just run:

startx

25 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

If it works, you should be able to interact with a very basic windowed environment and run commands in xterm. You can exit by typing
exit

649 reading: Grab 2 Fr

(/posts/new)

Login

into xterm and hitting Enter.

It is here where I learned I used the wrong video drivers my rst time around, so I had to uninstall the old ones and reinstall a dierent package. To remove a package in Pacman, just type:

pacman -Rns package_name

26 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

The
n

649 reading: Grab 2 Fr

(/posts/new)

Login

ag removes all the conguration les related to a package, while the


s

ag removes any dependencies that are now unnecessary. I generally always use
n

and
s

when removing a package, because I like to keep my system clean of cruft. If you're having trouble with your video drivers and testing X, there's more information on troubleshooting it (https://wiki.archlinux.org/index.php /Beginners%27_Guide#Troubleshooting) in the Beginner's Guide. Stay with us, we're at the last step! All that's left is to install your desktop environment of choice. First, install a few fonts:

sudo pacman -S ttf-dejavu


Then, pick your favorite desktop environment (http://lifehacker.com /5762081/wtf-desktopenvironments-gnomekde-and-more-explained) and install it (you can see lots of good choices here (https://wiki.archlinux.org
RELATED

WTF Desktop

27 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

/index.php /Desktop_Environment)). depending on what you choose, but it should be simple. For example, to

649 reading: Grab 2 Fr

Your commands will dier

install a GNOME desktop, you'd run:

Environments: GNOME, KDE, and More Explained (http://lifehacker.com /5762081/wtf-desktopenvironments-gnomekde-andmore-explained)


You can customize nearly every last inch of your Linux installation to t your liking, and it starts with choosing the right desktop environment. Read (http://lifehacker.com /5762081/wtf-desktopenvironments-gnomekde-and-more-explained)

(/posts/new)

Login

sudo pacman -S gnome


This could take awhile, depending on how big of an environment you want. Once it's done, you can turn on a display manager (https://wiki.archlinux.org /index.php/Display_Manager) to give yourself a graphical login to your new desktop. GNOME comes with the
gdm

display manager, so to enable its service (remember those?) we just need to run:

sudo systemctl enable gdm.service


Now, reboot your system with
sudo reboot

and you should nd yourself inside a new desktop on your new Arch system! Hooray!

28 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

649 reading: Grab 2 Fr

(/posts/new)

Login

Going Further: Using Pacman, Installing Other Apps, and More


Congratulations on setting up your rst Arch desktop. There's a lot more to learn, but that's pretty much where this guide ends. Here are some things you may want to read up on to get started:

29 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

649 reading: Grab 2 Fr

(/posts/new)

Login

That's it for now! There's a ton of other information out there, and lots of cool things to do, but this will get you up and running. If you have any questions, Google and the Arch Forums are your friends, but so are we! Arch is a pretty popular distribution (http://lifehacker.com /5170138/ve-best-linuxdistributions) among Lifehacker readers, so hit us up in the comments of this post or in our weekly open thread (http://lifehacker.com /tag/openthread/) if you've got questions.
Title image remixed from somchaij (http://www.shutterstock.com

RELATED

Five Best Linux

Distributions (http://lifehacker.com /5170138/vebest-linux-distributions)


There are many, many Linux distributions, and a lot of unique reasons to like them. Read on to see which open-source operating systems inspired our Read (http://lifehacker.com /5170138/ ve-best-linuxdistributions)

/pic-66288685/stock-photo-completing-the-missing-jigsaw-puzzle-conceptfor-business-with-completing-the-team-with-nal-person.html) (Shutterstock) .

L Discuss

33 discussions displayed because an author is participating or following a participant. 3 additional replies awaiting review.

1 Author is participating
BishopBlaize Since I built my rst

@
1 L

1 Author is participating
installgen2 ( Maybe this is just me projecting my bad

Hackintosh I realized how

30 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

1 Author is 2 Fr Grab PK 649 reading:

useful is to have a fully

@ tested list of hardware to@ participating


choose from before you build 2 1 L Mplicit serpent5 SenorValasc aem2 (http:// (http (htt 1 andzomeburner add the OS. Linux 1 L has For My I remember run those rst Arch experience who on back both nd when my their of Linux server you good compatibility, but not I was wondering if switching network was posted and my Arch, the desktop, card many last doesn't guide years and I I work ago am perfect, and the reason I left to a non-debian-based distro on reboot when bookmarked wicked I had confused into no it the idea with by installed what the systemd. this was because of one too many would make some softwares system, Linux intention I know idea it's have of now was giving a look all the about. it linux at a this shot. I updates that took a weekend uninstallable. Could that be post didn't Now standard, -around stick but with 2Iyears miss it for my later long to get my soundcard working the case ? https://bbs.archlinux.org and I've rc.conf, bookmarked ended up running updated mostly again. I wonder ifthe someone

experiences with Arch, but if 1 Author is you wanted a really participating

customized Linux estebanrules Ishaan Bahal (/posts/new) Login distribution, not myrddynwhy (htt go with For those people I ran Ubuntu andwho then other Gentoo? Compile times are a I appreciate your articles, so Debian-based connect to a wi distros which for is pain, but I've found Gentoo I turned o my AdBlock... years secured and by years. a wep I key still and really to be a lot less fussy than like are facing Debian, problems, but I think a simple that ... only to nd you don't have Arch. In all honesty though,

solution might is because to Is I'm most ads onbe here. I'd just go for a that minimal comfortable in the Debian intentional or is something install of Debian testing or 1. Go to wi-menu. /viewtopic.php?... Ubuntu guide...wonder dammit since, with if I'll the get odd environment. For examples, games, else blocking might link to such as list for Ubuntu 2.Connect to your wi AP . (https://bbs.archlinux.org foray around ! into to Fedora it this 12/12/12 10:07am (http://lifehacker.com/i-run-arch-on-both-my-server-an drivers, and so many others them people wanting toCore do a and linux . 12/06/12 11:20am (http://lif When I decided to "step up" /viewtopic.php?pid=1220535 Mint. time.. I It's came across apps ? just that Ithis don't ? 7/11/13 8:56pm (http://lifeh build 3.When prompted to a distro that required ) article . when searching 12/06/12 5/26/13 2:55am 1:43pm (http://lifehacker.com/for-those-who(http://lifehacker.com/i-remember-back-when-you-poste nd-their-network-c often see an Arch package ? 12/06/12 8:35am (http://lifehacker.com/since-i-built-my rst-hackintosh-i nickthename Connecting failed, save the some more know-how and Google for alternatives to available... I know there is Whitson Gor Gentoo pro le. work, I tried out both I've found that doing a Ubuntu, Fedora and Mint the Whitson compiling possibility, 1 L Gor and Arch. Gentoo great, First of /etc/netctl all: Thank is you! minimal installation of edit 4.Go to and and the idea of somewhat but... but the compile times really Ubuntu has a pretty good list ubuntu ale bit of messing your APand pro and add \" building up9:50am my own Second, yes we do have ads, ? 12/06/12 (http://lifehacker.com/i-was-wondering-if-switching-to-a weighed down on me and I of compatible hardware: aroundthe in the before keycommand line customised Linux system though not a ton of them. felt like I was always "xing https://wiki.ubuntu.com allows you to gain plenty of from scratch really pulled me Usually only one or so is Example : 1 L Whitson Gor something" instead of just /HardwareSuppor knowledge of linux without in. I gained a lot of Linux visible at a time, so maybe Key=\"123456789 working in a stable This is why8:50am I love the AUR. t 12/06/12 (http://lifehacker.com/ubuntu-has-a-pretty-good-list-of-c having to end up with a knowledge from using the you're just missing it? 7/09/13 5:10am (http://lifeh 0 environment. Chances are, if there's an rather unstable setup. Also, more "user-friendly" Although something else appmajorsquirre you want, someone's much the knowledge you this 1 L Today of I dual-boot Ubuntu distributions but, as could be blocking them. already compiled it and you pick up when installing and Arch. I still love thea ease article picked So can suggests, I use that I've list for my Maybefrom near-nothing is can install it with a package distro and the Debian-base of up much more sincethat diving Arch install? Would FlashBlock manager like Yaourt or distro speci c, so it's to Ubuntu (and truth be nice told I back work into the world of Arch ? 7/11/13 9:49pm (http://lifeh Packer. In fact, I've probably make your but distro specic like Unity) I primarily and well I will never look had to compile LESS from knowledge be on use Arch. Arch is something very fast, back ? 12/10/12 9:50pm (http://lifehacker.com/so-can-i-use-that-list-for-my-arch source on Arch than I did on that is very stable, and I've learned a ton . 6/06/13 2:25pm (http://lifehacker.com/my-rst-experience-of-linux-was-ar Ubuntu common more about the innerWhitson Gor ! 12/06/12 9:52am (http://lifehacker.com/this-is-why-i-love-the-aur-chances . 12/06/12of 3:53pm (http://life workings Linux from using srzbble (http I've been using Arch for more than one year and I never had to compile. If it's not here: https://www.archlinux.org /packages/ Then it's here: https://aur.archlinux.org
1 L

Arch. freddy_youn Anyway, this is a great instal Fussy which way? guide. in One thing to mention however is that there is an Actually I couldn't stand issue with setting up Gentoo because of its ethernet. compile times.

You can nd a resolution to Arch just that issue here. work (https://bugs.archlinux.org s 12/07/12 5:35am (http://life /task/33923)

31 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

/ 12/06/12 2:52pm (http://lifehacker.com/ive-been-using-arch-for-more-than-one-year-and-i-never-46539624 Have donniezazen fun and 2

freddy_young

649 reading: Grab 2 Fr ; others... ) 5/17/13 9:22am (http://lifehacker.com/i-ran-ubuntu-and-then-o

(/posts/new)

Login

32 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

649 reading: Grab 2 Fr

(/posts/new)

Login

About (http://lifehacker.kinja.com/5732066/about-lifehacker) Help (http://help.gawker.com/) Terms of Use (http://legal.kinja.com/kinja-terms-of-use-90161644) Privacy (http://legal.kinja.com/privacy-policy-90190742) Content Guidelines (http://legal.kinja.com/content-guidelines-90185358)

33 of 34

08/01/2013 09:33 PM

Build a Killer Customized Arch Linux Installation (and L...

http://lifehacker.com/5680453/build-a-killer-customized-...

RSS (http://feeds.gawker.com/lifehacker/full) Jobs (http://grnh.se/2ctqpi) P 649 reading: Grab 2 Fr Gawker Media 2013

(/posts/new)

Login

34 of 34

08/01/2013 09:33 PM

Das könnte Ihnen auch gefallen