Keymap
list keymap using:
1
localectl list-keymaps
and set key using
1
loadkeys us
internet
- WiFi-authenticate to the wireless network using iwctl
- time:
1
timedatectl set-ntp true
Mirrors
We should have the fastest mirror.
- Synchronizing packages:
1 2
pacman -Syyy pacman -S reflector
- I am in China, so:
1
reflector -c China -a 6 --sort rate --save /etc/pacman.d/mirrorlist
- Once again
1
pacman -Syyy
Partitioning
lsblk
to see the partitions on drive
Use cfdisk
to partition the disk you want, my case is /dev/sda
, so using the command
1
cfdisk /dev/sda
We need a swap partition and a root partition.
the swap partition should be two times of the computer memory. The remaining is root partition.
- swap : Primary partition; Type is
Linux swap / Soaris
or number is 82; - root : Primary partition; Type is
Linux
or number is 83.
and then write the changes and quit. type again lsblk
to see the disk partitions.
Formatting
- swap
1 2
mkswap /dev/sda3 swapon /dev/sda3
- root
1
mkfs.ext4 /dev/sda4
Mounting
1
mount /dev/sda4 /mnt
And then mount the windows partition.
1
2
mkdir /mnt/windows
mount /dev/sda2 /mnt/windows
Base Install
Install essential packages:
1
pacstrap /mnt base linux linux-firmware vim intel-ucode
Fstab
generate the file system table:
1
genfstab -U /mnt >> /mnt/etc/fstab
Chroot
Change root into the new system:
1
arch-chroot /mnt
Locales
Timezones:
1
2
3
4
timedatectl list-timezones
timedatectl list-timezones | grep Shanghai
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc
Edit locale.gen
file.
1
vim /etc/locale.gen
uncomment the language you want to use. My case is en_US.UTF-8 UTF-8
.
Then generate the locale, and edit locale.conf, and vconsole.conf
1
2
3
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
echo "KEYMAP=us" >> /etc/vconsole.conf
Hostname
1
vim /etc/hostname
set the name of your computer(hostname), my case if piyazon
.
Then
1
vim /etc/hosts
put these code to that file:
1
2
3
127.0.0.1 localhost
::1 localhost
127.0.1.1 piyazon.localdomain piyazon
Replace piyazon
with your hostname that you set in the previous step
save and exit.
Password
give a passwd to root user:
1
passwd
Grub
1
pacman -S grub ntfs-3g networkmanager network-manager-applet wireless_tools wpa_supplicant os-prober mtools dosfstools base-devel linux-headers bluez bluez-utils pulseaudio-bluetooth cups reflector xdg-utils xdg-user-dirs
installing grub:
1
grub-install --target=i386-pc /dev/sda
generate grub configuration file:
before preceed, make sure you uncomment the line GRUB_DISABLE_OS_PROBER=false inside /etc/default/grub
1
grub-mkconfig -o /boot/grub/grub.cfg
Enable Services
1
2
3
systemctl enable NetworkManager
systemctl enable bluetooth
systemctl enable cups
New user
1
2
3
useradd -mG wheel pi
passwd pi
EDITOR=vim visudo
uncomment the line %wheel ALL=(ALL) ALL
, save and exit.
Install iwd (optional)
1
2
3
4
5
pacman -S iwd
systemctl enable iwd.service
systemctl start iwd.service
systemctl enable systemd-resolved.service
systemctl start systemd-resolved.service
edit a file:
1
vim /etc/iwd/main.conf
and put this in here.
1
2
3
4
5
[General]
EnableNetworkConfiguration=true
[Network]
NameResolvingService=systemd
Reboot
exit the installation,
1
2
3
exit
umount -a
reboot
Internet
After reboot, connect the internet using nmtui
command(if you want to use WiFi), or you can use iwd if you have installed in the previous step.
Graphics Driver(optional, depends on you cpu)
1
sudo pacman -S xf86-video-intel
Display Server
1
sudo pacman -S xorg
Display Manager
1
2
sudo pacman -S lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings
sudo systemctl enable lightdm
Desktop
1
sudo pacman -S xfce4 xfce4-goodies safari
Yay(optional, you can install later when you needed)
1
2
3
4
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Done
Reboot the system and it will enter xfce4 Desktop automatically.