Arch Linux Install Guide
This is a step by step guide to installing Arch Linux from the command line without any extra bloat or unnecessary steps.
creating a bootable usb drive
The first step to installing Arch Linux onto your computer is downloading the Arch Linux iso file and then booting it onto a usb drive. In order to do this download the Arch Linux iso file from the Arch Linux website (archlinux.org) and then opening a terminal and navigating to the directory were the iso file is located. After inserting the usb drive into your computer, confirm the id of the drive and then run this command: dd if='name of arch Linux iso file' of='location of drive, /dev/sdb/ for example' status="progress". Be careful that you do not make the of variable the drive on which you have current os installed on because it will delete everything and replace it with just the iso file.
booting from the usb drive
After installing the iso file to your usb drive reboot your computer and enter it’s boot settings. Choose to boot from the usb drive you just created and then enter the console. From here you will begin installing Arch Linux to your computer.
internet connection
Before beginning the installation make sure that your computer has an internet connection. Connecting you computer via Ethernet is the easiest route although connecting via wifi is also possible. Make sure that you have an internet connection by using ip a to check your ip. You can also ping to check for an internet connection.
setting keyboard layout
To list available keyboard layouts navigate through /usr/share/kbd/keymaps/ to find the keyboard layout the you use. After finding your keyboard layout, using loadkeys you can load that keyboard layout.
system clock
To make sure that your system clock is accurate use timedatectl set-ntp true
partitioning your disk
The easiest tool to partition your disk is to use cfdisk. Using the command fdisk -l, you can find the location of the disk that you want to install Arch Linux onto. (Example: /dev/sdb) Once you have found your disk, you can use cfdisk 'drive location' to edit the partition table. Create your first partition with the size that you want your main storage to have and then give it the Linux type and mark it as bootable. If you choose to, you can also make a swap partition or any other partition here. Once you have to chosen to make all of the changes to the disk make sure to write and exit properly.
formatting the partitions
To format your main partition with the ext4 file system, use mkfs.ext4 'path to main partition, example: /dev/sda1'. If you created a swap partition make sure to format that as well with mkswap /dev/'swap partition'.
mounting your partitions and file systems
The traditional directory in which you mount file systems to your system is /mnt. To mount your newly created file systems, use the command mount /dev/'root partition' /mnt and if you created a swap partition, mount that as well with swapon /dev/'swap parition'.
installing the base system
To install the base essential packages use the command pacstrap /mnt base linux linux-firmware.
configuring your installed system
Using the command genfstab -U /mnt >> /mnt/etc/fstab you can set the partitions that you want to be auto mounted when your system boots. After this, you can access your system through chroot using the command arch-chroot /mnt. This will bring you into a new terminal that is your newly installed system.
To set the timezone, use the command ln -sf /usr/share/zoneinfo/'region'/'city' /etc/localtime and run hwclock --systohc to generate /etc/adjtime.
To set your local, edit /etc/locale.gen and uncomment your preferred local and other locals that you need. Example: en_US.UTF-8 UTF-8. After this, use the command locale-gen to save your edits.
Additionally, you will need to create /etc/locale.conf and add your proffered lang value to it. Example: LANG=en_US.UTF-8.
You will also need to edit /etc/vconsole.conf and add your preferred keymap. Example: KEYMAP=de-latin1
network configuration
Firstly edit /etc/hostname with your preferred name for your system.
Next edit /etc/hosts and add this:
127.0.0.1 localhost
::1 localhost
127.0.1.1 'your host name'.localdomain' your host name'
Use pacman -S networkmanager to install the network manager for your system and run systemctl enable NetworkManager.service to enable it.
boot loader
To install the grub boot loader, use the command, pacman -S grub. To install the grub boot loader to your system, use the command grub-install /dev/sdx, sdx being your drive. After that you have to create the grub configuration file with grub-mkconfig -o /boot/grub/grub.cfg.
finishing
Use the passwd to give your root user a password. Then use the exit command to exit your current chroot session and unmount the arch partition by using umount /mnt. After this you can reboot and boot into your newly installed Arch Linux system.
links
https://wiki.archlinux.org/title/installation_guide