1 min
15
Setup Artix Linux
A note about installing Artix Linux
- #linux
- #artix
By Baiyuechu@github/baiyuechuz
Setup for network
Unblock the wifi adapter and bring the interface up, then use
`connmanctl` to connect to a wifi network.`rfkill unblock wifi`— enable the wifi hardware if it's soft-blocked`ip link set wlan0 up`— bring the wireless interface up`connmanctl`— open the ConnMan interactive shell
terminal
rfkill unblock wifi
ip link set wlan0 up
connmanctl
connmanctl> scan wifi
connmanctl> services
connmanctl> agent on
connmanctl> connect wifi_<ssid>Setup for disk
Partition the disk, format the partitions, mount them, then install the base system.
`lsblk`— list all block devices to find your target disk`cfdisk`— interactive partition editor, create 2 partitions: EFI (FAT32) and root (ext4)`mkfs.fat -F32`— format the first partition as FAT32 for EFI`mkfs.ext4`— format the second partition as ext4 for root- Mount root to
`/mnt`and EFI to`/mnt/boot/efi` `basestrap`— install the base system (Artix's equivalent of`pacstrap`)`fstabgen`— generate`/etc/fstab`using UUIDs
terminal
lsblk
cfdisk /dev/{name_disk}
mkfs.fat -F32 /dev/{name_disk}1
mkfs.ext4 /dev/{name_disk}2
mount /dev/{name_disk}2 /mnt
mount --mkdir /dev/{name_disk}1 /mnt/boot/efi
basestrap /mnt base base-devel runit elogind-runit linux linux-firmware vim intel-ucode
fstabgen -U /mnt >> /mnt/etc/fstabSetup system
Chroot into the new system to configure it.
terminal
artix-chroot /mntCreate swap file
Create a 3GB swap file and add it to
`/etc/fstab` so it persists across reboots.terminal
dd if=/dev/zero of=/swapfile bs=1G count=3 status=progress
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
vim /etc/fstab
swapon --showSet timezone and clock
`ln -sf`— symlink the timezone file to`/etc/localtime``hwclock --systohc`— sync hardware clock to system time
terminal
ln -sf /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime
ls -l /etc/localtime
hwclock --systohcSet locale
Uncomment
`en_US.UTF-8 UTF-8` in `/etc/locale.gen`, then generate the locale.terminal
vim /etc/locale.gen # uncomment: en_US.UTF-8 UTF-8
locale-gen
vim /etc/locale.conf # add: LANG=en_US.UTF-8Set hostname and hosts
terminal
vim /etc/hostname # add: artix
vim /etc/hostsSet root password
terminal
passwdInstall essential packages
Install bootloader, network manager, and other essential tools.
terminal
pacman -S grub efibootmgr neovim networkmanager networkmanager-runit network-manager-applet xdg-utils xdg-user-dirsEnable NetworkManager service
Artix uses runit, so we create a symlink to enable the service.
terminal
ln -s /etc/runit/sv/NetworkManager/ /etc/runit/runsvdir/currentInstall GRUB bootloader
terminal
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ARTIX
grub-mkconfig -o /boot/grub/grub.cfgCreate user
`useradd -mG wheel`— create user with home directory and add to`wheel`group`visudo`— uncomment`%wheel ALL=(ALL) ALL`to allow sudo access
terminal
useradd -mG wheel baiyuechu
passwd baiyuechu
EDITOR=vim visudo # uncomment: %wheel ALL=(ALL) ALLExit and reboot
terminal
exit
umount -R --lazy /mnt
rebootReferences
Join Baiyuechu Newsletter!
Get notified when I publish new articles, tutorials, and project updates. Subscribe for insights and actionable content.