Archlinux Ultimate Installer
- A working internet connection
- Logged in as 'root'
First, test if you already have internet connection, so run:
ping google.comIf your ethernet is not working then try the following:
Connect to Wifi
root@archiso ~ # iwctl
[iwd]# device list
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect "Name of Network/WiFi"
[iwd]# exit
ip link
This will show you a number that looks something like enp39s0
timedatectl set-ntp true
timedatectl statusIn my case, I'll install arch on /dev/sda disk. You partition table should look like this (size may vary):
| Name | Partition | Size | Type |
|---|---|---|---|
| sda1 | /boot |
1G | EFI |
| sda2 | swap |
8G | swap |
| sda3 | / |
100G | ext4 |
| sda4 | /home |
Remaining space | ext4 |
First list your disks
fdisk -l
You should see your disk in here mine is called /dev/sda (WARNING do not write to any of these disks unless you know it's the one you want to install Arch on)
Now choose the disk you wish to partition
fdisk /dev/sda
You should now be in the fdisk utility you can press m for help
All of uor partitions will be GPT partitions so you can press g when ready
We will be create 4 partitions for the following:
- boot
- swap
- root
- home
We have to create 4 files systems here, so let's get started
- Format the EFI partition with:
mkfs.fat -F32 /dev/sda1
- Create a swap file
mkswap /dev/sda2
swapon /dev/sda2
- Format the Root partition with:
mkfs.ext4 /dev/sda3
- Format the Home partition with:
mkfs.ext4 /dev/sda4
You will need to mount sda1, sda3 and sda4, but you need to mount Root first
- Mount sda3 (ROOT)
mount /dev/sda3 /mnt
- Mount sda1 (BOOT)
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
- Mount sda4 (Home)
mkdir /mnt/home
mount /dev/sda4 /mnt/home
You can run df to make sure your mounts are in the right place
pacman -Syy
pacman -S reflector
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector -c "Vietnam" -c "Singapore" -c "Japan" -c "India" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
systemctl enable reflector.timer
Run the following:
pacstrap /mnt base base-devel linux linux-firmware vim intel-ucode sudo linux-headers networkmanager git
If you have an intel processor also include intel-ucode, for AMD amd-ucode
Generate UUIDs for newly created filesystem
genfstab -U /mnt >> /mnt/etc/fstab
You can check that it worked by printing the file:
cat /mnt/etc/fstab
Now you can change root into the new system:
arch-chroot /mnt
Set the time zone:
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
For example,
ln -sf /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime
Just search through /usr/share/zoneinfo until you find your nearest City
Run hwclock:
hwclock --systohc --utc
And check the time
date
Uncommnent en_US.UTF-8 UTF-8 and other needed locales with:
vim /etc/locale.gen
locale-gen
Create the locale.conf file, and set LANG variable
touch /etc/locale.conf
echo LANG=en_US.UTF-8 >> /etc/locale.conf
Create hostname file:
touch /etc/hostname
echo myhostname >> /etc/hostname
In my case, I will name myhostname with machine. You can call it anything you want
Add matching entries to hosts
vim /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
Note, Your terminal will display with username@myhostame
Change the root password:
passwd
We'll be using grub because it has the biggest presence in the boot loader world
pacman -S grub efibootmgr os-prober mtools
Create the directory where EFI partition will be mounted
[root@archiso /]# mkdir /boot/efi
Mount the ESP partition
[root@archiso /]# mount /dev/sda1 /boot/efi
Now let's install our boot loader
[root@archiso /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
Finally, generate the /boot/grub/grub.cfg file
[root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg
Here we can install a few more packages for networking and things like man pages
pacman -S man-db man-pages texinfo inetutils netctl dhcpcd networkmanager wpa_supplicant dialog linux-headers network-manager-applet mtools dosfstools xdg-user-dirs xdg-utils cups pipewire pipewire-alsa pipewire-pulse pipewire-jack bash-completion acpi acpid terminus-font
Enter exit then reboot
exit
umount -a
reboot
or
exit
umount -R /mnt
reboot
We need to switch root in order to enable network
ping archlinux.org
systemctl start NetworkManager.service
systemctl enable NetworkManager.service
systemctl start dhcpcd.service
systemctl enable dhcpcd.service
nmtui
- Add user
useradd -m -g wheel <your_user>- Create password
passwd <your_user>To switch to your user run:
su <your_user>Make sure you have vi installed
Note: Trying If raise error "visudo: no editor found (editor path = /usr/bin/vi)"
ln -s /usr/bin/vim /usr/bin/vi
Enter:
visudoand uncomment this line so it looks like this
%wheel ALL=(ALL) ALLif you hate typing your password everytime like me do this instead
%wheel ALL=(ALL) NOPASSWD: ALLpacman -S xorg xorg-server xorg-xinit
pacman -S xterm
pacman -S lightdm
pacman -S lightdm-gtk-greeter
pacman -S lightdm-gtk-greeter-settings
Here are GDM Display Manager (optional)
[root@archiso /]# pacman -S gdm
systemctl enable gdm.service
systemctl start gdm.service
systemctl enable lightdm
systemctl list-unit-files --state=enabled
Install xbacklight (Important)
sudo pacman -Syy
sudo pacman -Syu xorg-xbacklight
pacman -S i3 dmenu feh rofi
cp /etc/X11/xinit/xinitrc ~/.xinitrc
echo "exec i3 >> ~/.xinitrc
pacman -S pulseaudio pulseaudio-alsa pulseaudio-bluetooth pulseaudio-equalizer pulseaudio-jack alsa-utils playerctl
systemctl --user enable pulseaudio
I'm using i3 but you can install any WM or DE you like best
Here are some WM options:
- dwm
- awesome
- bspwm
- xmonad
Here are some DE options:
- XFCE
- KDE
- Gnome
pacman -S xfce4
pacman -S alacritty
I'm using Alacritty but you can install any terminal emulator you want
Here are some options:
- st
- rxvt-unicode
- termite
- terminator
pacman -S ttf-dejavu ttf-droid ttf-hack ttf-font-awesome ttf-lato ttf-liberation ttf-linux-libertine ttf-opensans ttf-roboto ttf-ionicons ttf-nerd-fonts-symbols ttf-bitstream-vera ttf-croscore noto-fonts ttf-ibm-plex
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
sudo rm -rfv yay
We will install Brave
yay -S brave-bin
Note, choose brave-bin
You can now reboot into your new system!
reboot
Go Back LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware Reload this Page Switching To Console With CTRL+ALT+F2