Difference between revisions of "Arch Linux Install Guide"

From My Big Bad Wiki
Jump to navigation Jump to search
 
(47 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
= How to install Arch Linux =
 
= How to install Arch Linux =
  
=== Really brief instructions ===
 
<pre>
 
# cfdisk
 
# mkswap /dev/sda2
 
# swapon /dev/sda2
 
# mkfs.ext4 /dev/sda1
 
# mount /dev/sda1 /mnt
 
# pacstrap -i /mnt base base-devel git
 
# genfstab -U /mnt > /mnt/etc/fstab
 
# cat /mnt/etc/fstab
 
# arch-chroot /mnt /bin/bash
 
# nano /etc/locale.gen
 
# locale-gen
 
# echo LANG=en_US.UTF-8 > /etc/locale.conf
 
# pacman -S grub os-prober
 
# grub-install --recheck /dev/sda
 
# grub-mkconfig -o /boot/grub/grub.cfg
 
# cd ~
 
# git clone git://github.com/tuxstorm/axf
 
# passwd
 
# exit
 
# umount /mnt
 
# reboot
 
  
# ls /sys/class/net
+
==Intro==
# systemctl enable dhcpcd@interface_name.service
+
I wrote this guide to help me anytime I need to install Arch Linux. This guide is specific to my needs and may not be good for everyone, but can be helpful for those struggling with the Arch Linux install. I prefer XFCE, so that's what the conclusion of this guide will give you.  
  
# cd axf
+
I've been running Linux off and on since 1998, but I am no expert with it. Arch Linux is my preferred distro, as I like the 'I only get what I want' approach, it runs great on not the most modern of computers, and it is a rolling release.
# ./axf
 
</pre>
 
  
==Intro==
+
If you find any errors or would like to make suggestions for my guide, feel free to [http://www.cdavis.us/contact/ write me].
I wrote this guide to help me anytime I need to install Arch Linux. This guide is specific to my needs and may not be good for everyone, but can be helpful for those struggling with the Arch Linux install. I prefer XFCE, so that's what the conclusion of this guide will give you.  
+
== IMPORTANT ==
  
I've been running Linux off and on since 1998, but I am no expert with it. Arch Linux is my preferred distro, as I like the 'I only get what I want' approach, it runs best on not the most modern of computers, and it is a rolling release.
+
*I cannot provide any support for those who choose to follow this guide. You will be installing at your own risk.
  
If you find any errors or would like to make suggestions for my guide, feel free to [http://www.cdavis.us/contact/ write me]. I cannot provide any support for those who choose to follow this guide. You will be installing at your own risk.
+
*This guide is based on installing to a computer running a standard BIOS and not UEFI. Since I recently installed on a computer with UEFI, I will work on a guide specific for that, but for now use the same resource I used, gloriouseggroll [[http://gloriouseggroll.tv/arch-linux-efi-install-guide/ blog]] [[https://www.youtube.com/watch?v=MMkST5IjSjY youtube]].
  
 
== Download the latest release ==
 
== Download the latest release ==
Line 71: Line 46:
 
== Chroot ==
 
== Chroot ==
 
  # arch-chroot /mnt
 
  # arch-chroot /mnt
 +
 +
 +
== pacman.conf ==
 +
 +
# nano /etc/pacman.conf
 +
 +
First, in the # Misc Options section
 +
* Uncomment #Color
 +
* Add line IloveCandy
 +
Then uncomment the Multilib repo
 +
 +
<pre>
 +
# Misc options
 +
#UseSyslog
 +
Color
 +
ILoveCandy
 +
#TotalDownload
 +
CheckSpace
 +
#VerbosePkgLists
 +
</pre>
 +
 +
<pre>
 +
[multilib]
 +
Include = /etc/pacman.d/mirrorlist
 +
</pre>
  
 
== Set the Locale ==
 
== Set the Locale ==
 
  # nano /etc/locale.gen
 
  # nano /etc/locale.gen
Uncomment your locales. For me, I uncomment ''en_US.UTF-8 UTF-8'' and ''en_US ISO-8859-1''
+
Uncomment your locales. For me, I uncomment ''en_US.UTF-8 UTF-8''
 
  # locale-gen
 
  # locale-gen
  
 
== Networking ==
 
== Networking ==
  
  # ls /sys/class/net
+
  # ip link
  
 
  # systemctl enable dhcpcd@enp2s0.service
 
  # systemctl enable dhcpcd@enp2s0.service
Line 98: Line 98:
 
  # reboot
 
  # reboot
  
 
+
== Set hostname ==
 +
# hostnamectl set-hostname ''myhostname''
 +
== Configure timezone ==
 +
# timedatectl set-timezone America/Chicago
  
 
== Video Driver ==
 
== Video Driver ==
Line 106: Line 109:
 
For the system I'm using to generate this guide, I use the intel driver. Use the output from the above command to determine what driver you need.
 
For the system I'm using to generate this guide, I use the intel driver. Use the output from the above command to determine what driver you need.
 
  # pacman -S xf86-video-intel
 
  # pacman -S xf86-video-intel
 +
If you're installing as a guest OS using Virtualbox, use these commands to get video drivers
 +
# pacman -S virtualbox-guest-utils
 +
Choose option '2'
  
 
== Install X ==
 
== Install X ==
Line 130: Line 136:
 
  # %wheel ALL=(ALL) ALL
 
  # %wheel ALL=(ALL) ALL
  
== Set hostname ==
+
== Using NTP ==
  # hostnamectl set-hostname ''myhostname''
+
 
== Configure timezone ==
+
  # pacman -S ntp
  # timedatectl set-timezone America/Chicago
+
 
 +
  # timedatectl set-ntp true
  
 
== Reboot and log in as your user and launch XFCE ==
 
== Reboot and log in as your user and launch XFCE ==
Line 141: Line 148:
  
 
== Install a display manager ==
 
== Install a display manager ==
  $ sudo pacman -S lxdm xorg-server-xephyr accountsservice
+
  $ yaourt -S lxdm lxdm-themes xorg-server-xephyr accountsservice
 +
 
 +
$ sudo systemctl enable lxdm.service -f
 +
 
 +
Modify the config
 +
sudo nano /etc/lxdm/lxdm.conf
  
$ sudo systemctl enable lxdm.service
+
LXDM theme location: /usr/share/lxdm/themes/
  
 
== Multimedia ==
 
== Multimedia ==
Line 152: Line 164:
  
 
== First applications ==
 
== First applications ==
  $ sudo pacman -S xfce4-whiskermenu-plugin xscreensaver
+
  $ sudo pacman -S git bash-completion xscreensaver
  
 
== Installing from AUR ==
 
== Installing from AUR ==
Line 162: Line 174:
  
 
First install dependencies Note: sudo should already be installed and configured, if not, add it to the install below.
 
First install dependencies Note: sudo should already be installed and configured, if not, add it to the install below.
 +
$ sudo pacman -S expac yajl --noconfirm
  
  $ sudo pacman -S expac yajl git bash-completion --noconfirm
+
Create a temp directory for building the needed packages
 +
  $ mkdir ~/temp
 +
$ cd ~/temp
  
 
Install cower first
 
Install cower first
 
+
$ gpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53
 
  $ curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower
 
  $ curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower
  $ makepkg PKGBUILD --skippgpcheck
+
  $ makepkg -i PKGBUILD --noconfirm
$ sudo pacman -U cower*.tar.xz --noconfirm
 
  
 
Now install pacaur
 
Now install pacaur
 +
$ curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pacaur
 +
$ makepkg -i PKGBUILD --noconfirm
  
$ curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pacaur
+
Cleanup and remove the temp directory
  $ makepkg PKGBUILD
+
  $ cd ~
  $ sudo pacman -U pacaur*.tar.xz --noconfirm
+
  $ rm -r ~/temp
  
=== Yaourt ===
+
=== Pamac-aur ===
  $
+
This is a nice GUI front end for pacaur that also includes a notification icon
 +
  $ pacaur -S pamac-pacaur
  
 
== Customizing the look ==
 
== Customizing the look ==
  
Arch Menu Icons
+
Replace the default XFCE applications menu with the Whisker Menu
 +
 
 +
Arch Menu Icons - I replace the default whisker menu icon with an Arch icon from this download location
 
  http://gabriela2400.deviantart.com/art/Arch-Linux-Start-Icons-175557586
 
  http://gabriela2400.deviantart.com/art/Arch-Linux-Start-Icons-175557586
  
Numix Frost Theme
+
'''Enable the Super Key to open the Whisker menu'''
 +
 
 +
* Launch the Keyboard application from the whisker menu (Menu > Settings > Keyboard)
 +
* Go to the Application Shortcuts tab
 +
* Press Add
 +
* In the command field type: xfce4-popup-whiskermenu
 +
* Press OK
 +
* A dialog box will appear and ask that you press the key you want to use for the shorcut. Press the Super Key
 +
* Once added, you should be able to press the Super Key and the Whisker menu will open
 +
 
 +
'''Numix Frost Theme'''
 
  $ gpg --keyserver http://pgp.mit.edu:11371 --recv-keys CDBD406AA1AA7A1D
 
  $ gpg --keyserver http://pgp.mit.edu:11371 --recv-keys CDBD406AA1AA7A1D
  
  $ pacaur -S numix-frost-themes
+
  $ pacaur -S numix-themes
  
Better Icons
+
'''Better Icons'''
  
 
  $ pacaur -S oranchelo-icon-theme-git
 
  $ pacaur -S oranchelo-icon-theme-git
  
Mouse theme
+
'''Mouse theme'''
 
  $ pacaur -S xcursor-vanilla-dmz
 
  $ pacaur -S xcursor-vanilla-dmz
  
===XFCE time display===
+
== Other Applications and Useful Utilities ==
I like to do a custom format for the date/time display
+
 
  %a, %h %e %l:%M%p
+
'''From the official repos'''
 +
 
 +
$ pacaur -S gnome-calculator unrar zip evince catfish mlocate p7zip keepass bc rsync pkgstats wget conky-manager grsync htop whois gnome-nettool hexchat
 +
 
 +
  $ pacaur -S shotwell inkscape python2-numpy python-lxml gcolor2 veracrypt dia shutter variety simplescreenrecorder pidgin nmap
 +
 
 +
'''From the Arch User Repository (AUR)'''
  
== Using NTP ==
+
$ pacaur -S mugshot
  
  $ sudo pacman -S ntp
+
  $ pacaur -S archlinux-artwork
  
  $ sudo timedatectl set-ntp true
+
  $ pacaur -S pamac-aur
  
== Other Applications and Useful Utilities ==
+
systemd-manager-git netdata-git gtk-theme-config
 +
 +
$ pacaur -S engrampa-thunar
  
'''From the official repos'''
+
== Printing ==
  
  $ sudo pacman -S gnome-calculator unrar zip evince catfish mlocate system-config-printer p7zip keepass bc rsync pkgstats wget conky-manager grsync htop whois gnome-nettool hexchat
+
  $ pacaur -S cups gtk3-print-backends system-config-printer
  
  $ sudo pacman -S shotwell inkscape python2-numpy python-lxml gcolor2 veracrypt dia shutter variety simplescreenrecorder pidgin nmap
+
  $ sudo systemctl enable org.cups.cupsd.service
  
'''From the Arch User Repository (AUR)'''
+
$ sudo systemctl start org.cups.cupsd.service
  
  $ pacaur -S systemd-manager-git netdata-git gtk-theme-config mugshot archlinux-artwork pamac-aur grub-customizer
+
  $ sudo gpasswd -a ''username'' sys
 
$ yaourt -S engrampa-thunar
 
  
 
== Tweaks ==
 
== Tweaks ==
Line 243: Line 278:
 
options snd-usb-audio index=-2
 
options snd-usb-audio index=-2
 
</pre>
 
</pre>
 +
 +
= Really brief instructions =
 +
<pre>
 +
# timedatectl set-ntp true
 +
# cfdisk
 +
# mkswap /dev/sda2
 +
# swapon /dev/sda2
 +
# mkfs.ext4 /dev/sda1
 +
# mount /dev/sda1 /mnt
 +
# pacstrap -i /mnt base
 +
# genfstab -U /mnt > /mnt/etc/fstab
 +
# arch-chroot /mnt
 +
# ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
 +
# nano /etc/locale.gen
 +
# locale-gen
 +
# echo LANG=en_US.UTF-8 > /etc/locale.conf
 +
# echo LC_COLLATE=en_US.UTF_8 >> /etc/locale.conf
 +
 +
# pacman -S grub os-prober
 +
# grub-install --recheck /dev/sda
 +
# grub-mkconfig -o /boot/grub/grub.cfg
 +
# passwd
 +
# exit
 +
# umount /mnt
 +
# reboot
 +
 +
# ip link
 +
# systemctl enable dhcpcd@interface_name.service
 +
# systemctl start dhcpcd@interface_name.service
 +
</pre>
 +
= Acknowledgments =
 +
*This guide is derived form numerous resources on the net, most from the Arch Linux Wiki itself
 +
*DBirks - for suggestions made to my pacaur installation section

Latest revision as of 09:10, 1 December 2016

How to install Arch Linux

Intro

I wrote this guide to help me anytime I need to install Arch Linux. This guide is specific to my needs and may not be good for everyone, but can be helpful for those struggling with the Arch Linux install. I prefer XFCE, so that's what the conclusion of this guide will give you.

I've been running Linux off and on since 1998, but I am no expert with it. Arch Linux is my preferred distro, as I like the 'I only get what I want' approach, it runs great on not the most modern of computers, and it is a rolling release.

If you find any errors or would like to make suggestions for my guide, feel free to write me.

IMPORTANT

  • I cannot provide any support for those who choose to follow this guide. You will be installing at your own risk.
  • This guide is based on installing to a computer running a standard BIOS and not UEFI. Since I recently installed on a computer with UEFI, I will work on a guide specific for that, but for now use the same resource I used, gloriouseggroll [blog] [youtube].

Download the latest release

This guide will be updated to reference any changes in the install procedure.

Currently written for version: 2016.11.01

Download here: https://www.archlinux.org/download/

Partition the drive

# cfdisk

I create 2 partitions. A Swap partition and the rest of the drive dedicated to /.

Important: Make note of your partitions. Based on the way I do it, my / partition will is /dev/sda1 and the swap partition is /dev/sda2. If you do it differently, you will need to adjust the next steps based on what they are.

Format the filesystem

# mkswap /dev/sda2
# swapon /dev/sda2
# mkfs.ext4 /dev/sda1

Mount the filesystem

# mount /dev/sda1 /mnt

Install the base packages

# pacstrap /mnt base base-devel grub-bios

Generate fstab

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

Chroot

# arch-chroot /mnt


pacman.conf

# nano /etc/pacman.conf
First, in the # Misc Options section
* Uncomment #Color
* Add line IloveCandy
Then uncomment the Multilib repo
# Misc options
#UseSyslog
Color
ILoveCandy
#TotalDownload
CheckSpace
#VerbosePkgLists
[multilib]
Include = /etc/pacman.d/mirrorlist

Set the Locale

# nano /etc/locale.gen

Uncomment your locales. For me, I uncomment en_US.UTF-8 UTF-8

# locale-gen

Networking

# ip link
# systemctl enable dhcpcd@enp2s0.service

Configure bootloader

# grub-mkconfig -o /boot/grub/grub.cfg
# grub-install /dev/sda

Set root password

# passwd

Exit chroot, unmount, and reboot

# exit
# umount /mnt
# reboot

Set hostname

# hostnamectl set-hostname myhostname

Configure timezone

# timedatectl set-timezone America/Chicago

Video Driver

Determine the card type

# lspci | grep VGA

For the system I'm using to generate this guide, I use the intel driver. Use the output from the above command to determine what driver you need.

# pacman -S xf86-video-intel

If you're installing as a guest OS using Virtualbox, use these commands to get video drivers

# pacman -S virtualbox-guest-utils
Choose option '2'

Install X

# pacman -S xorg-server xorg-server-utils xorg-xinit xorg-apps

Install Desktop Environment

I prefer XFCE

# pacman -S xfce4 xfce4-goodies gvfs ttf-liberation xdg-user-dirs opendesktop-fonts firefox

Sound

# pacman -S alsa-utils pavucontrol pulseaudio-alsa

Create a user and add to groups

# useradd -m -g users -G video,audio,network,optical,storage,disk,wheel -s /bin/bash username
# chfn username
# passwd username

Enable wheel group in sudoers file

# nano /etc/sudoers

Uncomment this line in that file

## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

Using NTP

# pacman -S ntp
# timedatectl set-ntp true

Reboot and log in as your user and launch XFCE

# reboot
$ startxfce4

Install a display manager

$ yaourt -S lxdm lxdm-themes xorg-server-xephyr accountsservice
$ sudo systemctl enable lxdm.service -f

Modify the config

sudo nano /etc/lxdm/lxdm.conf

LXDM theme location: /usr/share/lxdm/themes/

Multimedia

Codecs

$ sudo pacman -S gst-plugins-base gst-plugins-base-libs gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gstreamer0.10 gstreamer0.10-plugins

Audio Player

$ sudo pacman -S rhythmbox

First applications

$ sudo pacman -S git bash-completion xscreensaver

Installing from AUR

Pacaur

I am currently using pacaur as my main package management tool. Here is how to install it.

First install dependencies Note: sudo should already be installed and configured, if not, add it to the install below.

$ sudo pacman -S expac yajl --noconfirm

Create a temp directory for building the needed packages

$ mkdir ~/temp
$ cd ~/temp

Install cower first

$ gpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53
$ curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower
$ makepkg -i PKGBUILD --noconfirm

Now install pacaur

$ curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pacaur
$ makepkg -i PKGBUILD --noconfirm

Cleanup and remove the temp directory

$ cd ~
$ rm -r ~/temp

Pamac-aur

This is a nice GUI front end for pacaur that also includes a notification icon

$ pacaur -S pamac-pacaur

Customizing the look

Replace the default XFCE applications menu with the Whisker Menu

Arch Menu Icons - I replace the default whisker menu icon with an Arch icon from this download location

http://gabriela2400.deviantart.com/art/Arch-Linux-Start-Icons-175557586

Enable the Super Key to open the Whisker menu

  • Launch the Keyboard application from the whisker menu (Menu > Settings > Keyboard)
  • Go to the Application Shortcuts tab
  • Press Add
  • In the command field type: xfce4-popup-whiskermenu
  • Press OK
  • A dialog box will appear and ask that you press the key you want to use for the shorcut. Press the Super Key
  • Once added, you should be able to press the Super Key and the Whisker menu will open

Numix Frost Theme

$ gpg --keyserver http://pgp.mit.edu:11371 --recv-keys CDBD406AA1AA7A1D
$ pacaur -S numix-themes

Better Icons

$ pacaur -S oranchelo-icon-theme-git

Mouse theme

$ pacaur -S xcursor-vanilla-dmz

Other Applications and Useful Utilities

From the official repos

$ pacaur -S gnome-calculator unrar zip evince catfish mlocate p7zip keepass bc rsync pkgstats wget conky-manager grsync htop whois gnome-nettool hexchat
$ pacaur -S shotwell inkscape python2-numpy python-lxml gcolor2 veracrypt dia shutter variety simplescreenrecorder pidgin nmap

From the Arch User Repository (AUR)

$ pacaur -S mugshot
$ pacaur -S archlinux-artwork
$ pacaur -S pamac-aur

systemd-manager-git netdata-git gtk-theme-config

$ pacaur -S engrampa-thunar

Printing

$ pacaur -S cups gtk3-print-backends system-config-printer
$ sudo systemctl enable org.cups.cupsd.service
$ sudo systemctl start org.cups.cupsd.service
$ sudo gpasswd -a username sys

Tweaks

Preventing the webcam from becoming the default soundcard

$ sudo nano /etc/modprobe.d/alsa-base.conf

Paste the contents below in to the that file and reboot.

options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2

Really brief instructions

# timedatectl set-ntp true
# cfdisk
# mkswap /dev/sda2
# swapon /dev/sda2
# mkfs.ext4 /dev/sda1
# mount /dev/sda1 /mnt
# pacstrap -i /mnt base
# genfstab -U /mnt > /mnt/etc/fstab
# arch-chroot /mnt
# ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
# nano /etc/locale.gen
# locale-gen
# echo LANG=en_US.UTF-8 > /etc/locale.conf
# echo LC_COLLATE=en_US.UTF_8 >> /etc/locale.conf

# pacman -S grub os-prober
# grub-install --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
# passwd
# exit
# umount /mnt
# reboot

# ip link
# systemctl enable dhcpcd@interface_name.service
# systemctl start dhcpcd@interface_name.service

Acknowledgments

  • This guide is derived form numerous resources on the net, most from the Arch Linux Wiki itself
  • DBirks - for suggestions made to my pacaur installation section