Getting Started with Arch Linux: A Beginner's Installation Guide

Jarret B

Well-Known Member
Staff member
Joined
May 22, 2017
Messages
373
Reaction score
444
Credits
13,805
There are many distros available for Linux and Arch is one of them. Arch Linux is a very popular distro that we can cover the installation of for anyone wanting to use or try it.

Where most distros of Linux try to be user-friendly for acceptance by more users, Arch is user-centric. Being user-centric, it is based on the user’s needs. The base system is a command-line interface and lets the user specify the specific environment wanted. Let’s look into this and make a system you’ll like and appreciate.

Installation

The first thing you need is to download the necessary ISO file to use to install Arch. The website is at ‘https://archlinux.org/download/’. Towards the bottom of the page is a listing that is sorted by country. Find your country, then choose a site to download from for Arch. Once selected, you’re given a choice of files to download from the server you chose. For instance, the file you want to download is an ISO file similar to ‘archlinux-2024.10.01-x86_64.iso’ Here, this download is the October 2024 version that is 64 bit. Of course, in the future, the version will change, but you should always need the newest version. Download the file and, once completed, burn the image to a USB drive using a program similar to Balena or Etcher. Boot your system from this USB and perform the boot as normal.

NOTE: You can also install this on VirtualBox for testing.

Your system should stop at a Command-Line Interface (CLI) and you should be ‘root’ since the prompt is ‘root@archiso’.

Now, we need to start the installation by executing the command:

Code:
archinstall

Once the installation starts, you should see an output similar to Figure 1.

Figure 1.jpg

FIGURE 1

You can move up and down, select an option with ‘enter’ and go back to the main menu, once inside a sub-menu, by selecting ‘Back’.

The options are:

  • Archinstall Language – set to your preferred language
  • Mirrors – Specify your country for the closest mirror sites for downloading. Once you specify the country, the OS will test the speed of each site to see which is fastest
  • Locales – Lets you configure the keyboard layout, locale language and encoding
  • Disk Configuration – Configure partitioning of drives and format
  • Bootloader – Set the bootloader. The default is GRUB
  • Swap – Enable/Disable Swap
  • Hostname – specifies the Hostname of the system
  • Root Password – sets the password for the ‘root’ user
  • User Account – Lets you setup user accounts to use other than ‘root’
  • Profile – Allows you to specify the type of system, such as Desktop, Server, etc. as well as Desktop Environment (see Figure 2) and the Greeter
Figure 2.jpg

FIGURE 2

  • Audio – Specifies the audio server
  • Kernel – Lets you set the type of kernel to use. The default is ‘linux’
  • Additional Packages – specify other packages to install, such as firefox, gparted etc. Separate each package with a space
  • Network Configuration – You can manually set the configuration of the network interface (DHCP) or install a network manager
  • Timezone – Default is UTC, or you can specify the timezone to use
  • Automatic Time Sync (NTP) – Sets up NTP protocol to sync system time to an NTP Server
  • Optional Repositories – Selects other repositories to user-centric
Once you set the options, you can save the settings to a place on the hard disk you specify. Once everything is as you wish, select ‘Install’. It should show you the configuration script, so press ‘Enter’ to start the installation.

At the end of the installation, the script asks you if you want to ‘chroot’ into the OS. You only need to ‘chroot’ if you want to test the system.

Back at a terminal prompt, you can issue the command to restart the system:

Code:
reboot now

The system should restart and load all the specified settings you set in the ‘archinstall’ script.

Kernel

For users that are familiar with most of the choices you set during setup, the ‘Kernel’ option may be the one unknown. There are four choices available for the ‘kernel’ option.

  • linux
  • linux-hardened
  • linux-lts
  • linux-zen
The first option, the default, is the basic kernel that is installed.

For the second option, the ‘linux-hardened’ option is used to increase the security of the OS. Patches apply to increase security by disabling unneeded services, closing ports, and the like.

The LTS Kernel is a Long-Term Supported kernel that is more stable. It is a rolling-release of the kernel.

The last option is the ‘linux-zen’. To make this kernel, ‘Kernel-hackers’ make suggestions to provide better results for systems, mainly for games. Some people may not notice a difference in some games. The kernel is still supposed to be stable.

NOTE: Keep in mind that when you go through the ‘archinstall’, you can select all the kernels on the list. You can also install multiple Desktop Environments as well.

Once you reboot the system, select ‘Advanced option for Arch Linux’ from the GRUB Menu. You should then see the option, like in Figure 3, to select which kernel if you installed more than one.

Figure 3.jpg

FIGURE 3

To determine which kernel you are running from inside the OS, use the command:

Code:
uname -r

The output will be the version of the kernel, for example ‘6.11.5’, so the output is:

  • linux – 6.11.5
  • linux-hardened – 6.11.5-hardened
  • linux-lts – 6.11.5-lts
  • linux-zen – 6.11.5-zen
To change the kernel, you need to reboot or restart the system to select your choice.

Desktop Environments

If you install multiple Desktop Environments, then you can choose them when you are logging into the OS. Before pressing ‘enter’, there is a cogwheel in the bottom right corner. Select the cogwheel and a list should pop up showing the available Desktop Environments, as shown in Figure 4.

Figure 4.jpg

FIGURE 4

Conclusion


Hopefully, this is the information you need to look into Arch Linux.

You should be able to set up your system and get a Desktop Environment installed with an appropriate kernel.

Give Arch Linux a try, it is very customizable.
 
Last edited by a moderator:


Would Arch run well on 4 GiB
 
I love Garuda Arch Linux, easy to understand and the Dragonized version is wicked slick!
 
Great guide.
It underscores how easy it is to install Arch so it always baffles me why anyone would consider Arch installation difficult.
 
Quick way to get sools installed. Save to .sh file, chmod +x and run. Lecture here about running scripts from internet. Have GPT check it and alter it for the tools you like.

#!/bin/bash
# Logging Setup
LOG_FILE="install_log.txt"
echo "Script started at $(date)" > "$LOG_FILE"
# Color Definitions
RESET="\e[0m"
BLUE="\e[34m"
CYAN="\e[36m"
GREEN="\e[32m"
YELLOW="\e[33m"
RED="\e[31m"
MAGENTA="\e[35m"
WHITE="\e[37m"
# Check System Specs Function
check_system_specs() {
echo -e "${BLUE}Gathering system specifications...${RESET}" | tee -a "$LOG_FILE"
CPU=$(lscpu | grep "Model name:" | awk -F ':' '{print $2}')
GPU=$(lspci | grep -E "VGA|3D" | awk -F ':' '{print $3}')
RAM=$(free -h | awk '/Mem:/ {print $2}')
DISK=$(df -h / | awk 'NR==2 {print $4}')
echo -e "${CYAN}System Specifications:${RESET}" | tee -a "$LOG_FILE"
echo -e "${WHITE}CPU:${RESET} $CPU" | tee -a "$LOG_FILE"
echo -e "${WHITE}GPU:${RESET} $GPU" | tee -a "$LOG_FILE"
echo -e "${WHITE}RAM:${RESET} $RAM" | tee -a "$LOG_FILE"
echo -e "${WHITE}Available Disk Space:${RESET} $DISK" | tee -a "$LOG_FILE"
echo -e "${YELLOW}Pausing for 15 seconds to review system specifications...${RESET}"
sleep 15
}
# Check Disk Space
check_disk_space() {
REQUIRED_SPACE=$1
AVAILABLE_SPACE=$(df --output=avail / | tail -1 | awk '{print $1}')
if [ $AVAILABLE_SPACE -lt $REQUIRED_SPACE ]; then
echo -e "${RED}Insufficient disk space: Required $REQUIRED_SPACE KB, Available $AVAILABLE_SPACE KB${RESET}" | tee -a "$LOG_FILE"
return 1
fi
echo -e "${GREEN}Available Disk Space:${RESET} $(df -h / | awk 'NR==2 {print $4}')" | tee -a "$LOG_FILE"
return 0
}
# Check and Install Packages
install_packages() {
PACKAGE_LIST=($@)
INSTALLED_PACKAGES=()
NOT_INSTALLED_PACKAGES=()
for PACKAGE in "${PACKAGE_LIST[@]}"; do
if pacman -Q $PACKAGE &>/dev/null; then
INSTALLED_PACKAGES+=("$PACKAGE")
else
NOT_INSTALLED_PACKAGES+=("$PACKAGE")
fi
done
echo -e "${CYAN}Already Installed Packages:${RESET}" | tee -a "$LOG_FILE"
for PKG in "${INSTALLED_PACKAGES[@]}"; do
echo -e "${GREEN} - $PKG${RESET}" | tee -a "$LOG_FILE"
done
if [ ${#NOT_INSTALLED_PACKAGES[@]} -eq 0 ]; then
echo -e "${YELLOW}All packages in this group are already installed.${RESET}" | tee -a "$LOG_FILE"
return
fi
echo -e "${CYAN}Packages to be installed:${RESET}" | tee -a "$LOG_FILE"
for PKG in "${NOT_INSTALLED_PACKAGES[@]}"; do
echo -e "${MAGENTA} - $PKG${RESET}" | tee -a "$LOG_FILE"
done
echo -e "${BLUE}1) Install All${RESET}"
echo -e "${BLUE}2) Select Individually${RESET}"
echo -e "${BLUE}3) Skip${RESET}"
read -p "Choose an option [1-3]: " OPTION
case $OPTION in
1)
for PKG in "${NOT_INSTALLED_PACKAGES[@]}"; do
echo -e "${CYAN}Installing $PKG...${RESET}" | tee -a "$LOG_FILE"
sudo pacman -S --noconfirm $PKG || echo -e "${RED}Error installing $PKG${RESET}" | tee -a "$LOG_FILE"
done
;;
2)
for PKG in "${NOT_INSTALLED_PACKAGES[@]}"; do
read -p "Install $PKG? (y/n): " ANSWER
if [[ $ANSWER =~ ^[Yy]$ ]]; then
echo -e "${CYAN}Installing $PKG...${RESET}" | tee -a "$LOG_FILE"
sudo pacman -S --noconfirm $PKG || echo -e "${RED}Error installing $PKG${RESET}" | tee -a "$LOG_FILE"
fi
done
;;
3)
echo -e "${YELLOW}Skipping installation for this group.${RESET}" | tee -a "$LOG_FILE"
;;
*)
echo -e "${RED}Invalid option. Skipping.${RESET}" | tee -a "$LOG_FILE"
;;
esac
}
# Menu Function
main_menu() {
echo -e "${BLUE}Choose a category to install:${RESET}" | tee -a "$LOG_FILE"
echo -e "${CYAN}1) Productivity Tools${RESET}"
echo -e "${CYAN}2) Development Tools${RESET}"
echo -e "${CYAN}3) Entertainment Tools${RESET}"
echo -e "${CYAN}4) Streaming Tools${RESET}"
echo -e "${CYAN}5) Exit${RESET}"
read -p "Enter your choice [1-5]: " CHOICE
case $CHOICE in
1) install_productivity_tools ;;
2) install_development_tools ;;
3) install_entertainment_tools ;;
4) install_streaming_tools ;;
5) echo -e "${GREEN}Exiting...${RESET}" | tee -a "$LOG_FILE"; exit 0 ;;
*) echo -e "${RED}Invalid choice. Try again.${RESET}"; main_menu ;;
esac
}
# Installation Groups
install_productivity_tools() {
echo -e "${BLUE}Installing Productivity Tools...${RESET}" | tee -a "$LOG_FILE"
check_disk_space 500000 || return 1 # 500MB space check
install_packages libreoffice gimp darktable firefox chromium rclone
}
install_development_tools() {
echo -e "${BLUE}Installing Development Tools...${RESET}" | tee -a "$LOG_FILE"
check_disk_space 1000000 || return 1 # 1GB space check
install_packages python python-pip code neovim git base-devel
}
install_entertainment_tools() {
echo -e "${BLUE}Installing Entertainment Tools...${RESET}" | tee -a "$LOG_FILE"
check_disk_space 2000000 || return 1 # 2GB space check
install_packages retroarch vice vlc steam
}
install_streaming_tools() {
echo -e "${BLUE}Installing Streaming Tools...${RESET}" | tee -a "$LOG_FILE"
check_disk_space 1500000 || return 1 # 1.5GB space check
install_packages obs-studio shotcut
}
# Main Script
check_system_specs
while true; do
main_menu
done
 

Members online


Top