- Download the (base) ISO image and create a bootable flash drive
- Figure out the disk's name on your system; be careful to get this correct
otherwise you can very easily destory your current system
- on Linux, use
lsblk
to figure out which disk to use - on MacOS, use
diskutil list
to figure out which disk to use - make sure you use the disk name, not a partition
/dev/diskX
on MacOS, NOT/dev/diskXsY
(X, Y
are positive integers)/dev/sdX
on Linux, NOT/dev/sdXY
(X
is an alphabetical character,Y
is a positive integer)
- on Linux, use
- Using
dd
(if on MacOS, do this - others don't seem to work):dd if=[path_to_iso] of=[disk] -bs=4M status=progress
- if on MacOS, the
status=progress
argument is not supported - you'll have to useCtrl+t
to send a signal todd
to display its progress - also on MacOS, use
bs=4m
instead
- if on MacOS, the
- Using
cat
:cat [path_to_iso] > [disk]
- Using
cp
:cp [path_to_iso] [disk]
- Figure out the disk's name on your system; be careful to get this correct
otherwise you can very easily destory your current system
- If possible, use an ethernet connection - almost always works out of the box
- For WiFi in the live environment
- Artix
sudo rfkill unblock wifi
connmanctl enable wifi
connmanctl agent on
connmanctl scan wifi
connmanctl services
connmanctl connect [service]
then enter password
- Arch
nmtui
and setup
- Artix
- Figure out if you are on a UEFI system (if on UEFI, the directory
/sys/firmware/efi
should exist) - Run
lsblk
and find which disk to partition - Run
cfdisk /dev/[disk]
and partition the disk- BOOT partition (make it 1G); also set the bootable flag on it
- ROOT partition (make it more than 100G - this is where software packages will be installed to so make an informed decision based on the packages you expect to install on the system, as well as the amount of storage available)
- SWAP partition (at least as large as the RAM installed)
- Swap space is used by the OS in a few conditions; if memory pressure on RAM is very high, the OS may "swap" pages from RAM to disk (specifically to the SWAP partition).
- Another (arguably important) use for SWAP is to enable hibernation. When the system is called to hibernate, the OS copies all of the contents of RAM into SWAP (which is why SWAP should be at least the size of installed RAM) and shuts down the machine. On startup, the RAM is restored from SWAP and the system can resume.
- HOME partition (rest of the space)
- This is so that if you want to reinstall Linux, all of your files in the home directory can be preserved
- Even if you don't plan to reinstall Linux, it may be wise to have such a partition - some problems may be simple to fix with a reinstall...
- Format the partitions
- If running UEFI, format boot partition as FAT-32 (
mkfs.fat -F 32 [part]
), otherwise just format all partitions as EXT4 (mkfs.ext4 [part]
) - If you created a SWAP partition, format it using
mkswap [part]
command. - You can also use the above
mkfs
/mkswap
commands with the-L [label]
argument which will set the partition labels (label
should typically beBOOT
,ROOT
,HOME
,SWAP
)
- If running UEFI, format boot partition as FAT-32 (
- Mount the partitions
- ROOT partition on
/mnt
, BOOT partition on/mnt/boot
, HOME partition on/mnt/home
mount [root_part] /mnt
mkdir /mnt/{boot,home}
mount [boot_part] /mnt/boot
mount [home_part] /mnt/home
- If you created a SWAP partition, run the
swapon [part]
command which will indicate to the OS that the partition can be used for paging/swaping (it's opposite command isswapoff
).
- ROOT partition on
- Artix (using
runit
as the init system)basestrap /mnt base base-devel runit elogind-runit linux linux-firmware vim
fstabgen -U /mnt >> /mnt/etc/fstab
- Arch
pacstrap /mnt base base-devel runit elogind-runit linux linux-firmware vim
genfstab -U /mnt >> /mnt/etc/fstab
Important:
make sure that there are no duplicate entries in the /mnt/etc/fstab
(file-system table) file (the fstab
file specifies how the partitions should
be mounted)
- Artix
artix-chroot /mnt
- Arch
arch-chroot /mnt
- You'll probably be in
sh
, runbash
if you want to use that instead - Re-arrange the
pacman
mirrors so that the ones closest to you are at the top (file/etc/pacman.d/mirrorlist
); you may get better download speeds - (Artix) you may want to add the arch-linux mirrors to pacman so that you can
get the software which artix's mirrors don't have yet;
- Run
pacman -S artix-archlinux-support
and add theextra
,community
andmultilib
mirrors in the/etc/pacman.conf
file AFTER the artix mirrors[extra] Include = /etc/pacman.d/mirrorlist-arch [community] Include = /etc/pacman.d/mirrorlist-arch [multilib] Include = /etc/pacman.d/mirrorlist-arch
- Run
pacman-key --populate
after this
- Run
- Set timezone
ln -sf /usr/share/zoneinfo/[region]/[city] /etc/localtime
- Update hardware clock
hwclock --systohc
- Select the locales that you want (
vim /etc/locale.gen
and uncomment the ones you want; probably wanten_US.UTF-8
anden_US.ISO-8859-1
) locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
- Install a network manager
pacman -S networkmanager networkmanager-runit
- Run the network manager on boot (generally for a service
X
, this would be done using the commandln -s /etc/runit/sv/[X] /run/runit/service
, but therun/runit
directory is not mounted in this environment so runln -s /etc/runit/sv/NetworkManager /etc/runit/runsvdir/current
instead) - Give your computer a name
echo [comp_name] > /etc/hostname
- Some sensible defaults in the
/etc/hosts
file:127.0.0.1 localhost ::1 localhost 127.0.1.1 [comp_name].localdomain [comp_name]
- Install bootloader
pacman -S grub
(also installos-prober
if dual booting, andefibootmgr
if on EFI system) - Install
grub
on the disk- If using a UEFI system, run
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
- Else run
grub-install --recheck /dev/sda
- If using a UEFI system, run
grub-mkconfig -o /boot/grub/grub.cfg
- Set root password with
passwd
- Run
exit
to exit thechroot
environment,unmount -R /mnt
to recursively unmount all of the drive and finally reboot (remove the installation media so you don't boot into it again)
useradd -mG wheel [user]
- this creates the useruser
, creates their home directory and adds them to thewheel
group (to be used insudo
setup)- Set user's password
passwd [user]
sudo
setup- Go to the
/etc/sudoers
file and uncomment the line which reads%wheel ALL =(ALL) ALL
to allow the members of thewheel
group to runroot
commands, as long as they know the password - If you want
wheel
users to also be able to execute commands likeshutdown
orpacman
, you can add the following line%wheel ALL =(ALL) NOPASSWD: [commands]
wherecommands
is a comma separated command list (use the absolute path to commands) - Also add the line
Defaults !tty_tickets
to prevent reentering the password when you spawn a new terminal
- Go to the
- Install Xorg server
pacman -S xorg-server xorg-xinit
- Install many fonts
pacman -S noto-fonts{,-extra,-cjk,-emoji}
- Install
dwm
/dmenu
dependenciespacman -S lib{xft,xinerama}
- Install the software you want (here: terminal
kitty
, file managerpcmanfm
if you need it)pacman -S kitty pcmanfm
- (Do this as the user you created) get
dwm
anddmenu
git clone https://git.suckless.org/dwm
git clone https://git.suckless.org/dmenu
- Bind the terminal you installed in the
dwm/config.h
instead of the defaultst
terminal (also make whatever changes to the config you want)
- In each of the directories, run
sudo make install
(resolve any dependency errors as necessary) - Add the graphical programs which need to be run in
~/.xinitrc
(if onlydwm
needs to run, then add the lineexec dwm
which should the last line in the file always; other entries should end with&
to run in the background) - Try running
startx
which starts your graphical environment and debug any issues that come up (the log file is useful)- If you have any issues (such as permissions errors), try rebooting and then trying again
- Ensure you install the drivers for your graphics card otherwise the command
will fail (if you have to do this, reboot and then try
startx
again)
By default alsa
, which is a kernel module is installed and can provide a
low-level interface to control audio, but this may be too low level for most
applications.
In addition, many applications use the pulseaudio
sound server which provides
a higher level interface to control the sound system.
- To install the
pulseaudio
server, runpacman -S pulseaudio
. - A nice way to interface with
pulseaudio
is the GUI utilitypavucontrol
(which can be installed usingpacman -S pavucontrol
). - There is also a curses and command line utility which called
pulsemixer
(which can be installed withpacman -S pulsemixer
). It has a nice curses interface which can be used instead ofpavucontrol
and the command line version can be used in scripts/programming hot-keys.