An Arch Linux installation guide for Linux lovers

Spread the love
How to install Arch Linux

How to install Arch Linux. Arch Linux is a lightweight and highly customizable Linux distribution known for its simplicity, flexibility, and rolling-release update model. It’s designed for users who prefer to have full control over their system’s configuration and software choices.

What is it Arch Linux?

A Linux distribution made specifically for x86-64 processor-equipped machines is called Arch Linux. Judd Vinet came up with it in 2002. This distribution’s primary goals are swiftness, adaptability, and simplicity. Like Gentoo Linux, Arch Linux emphasizes centralized configuration. With this Arch Linux installation tutorial written for Linux fans, let’s dig right into the specifics.

Because Arch Linux uses a rolling-release strategy, the packages are only accessible for a short while after they are released. The most crucial aspect that sets Arch Linux apart is the pacman package manager. It provides administration for both user-created builds and packages in its repository.

The simplicity of configuration is a key component of Arch Linux. Despite the philosophy’s emphasis on simplicity, novices should not attempt the configuration procedure. You have this installation guide for Arch Linux, which is fortunate. In addition, it offers a few start-up configurations that are optional.

By carefully following the step-by-step instructions provided here, you may install Arch Linux on your computer. Don’t forget to customize your Arch Linux environment by selecting your preferred desktop environment, setting up your preferred system themes, and installing additional software.

Here are some key characteristics and information about Arch Linux:

Rolling Release

Arch Linux uses a rolling-release format, so you can obtain the most recent software updates without having to reinstall the entire operating system. As an alternative, you can routinely update your system to keep the newest features and packages up to date.

Pacman Package Manager

Software installation, updates, and removal are managed by Arch Linux using the Pacman package manager. A command-line utility called Pacman makes managing packages and their dependencies easier.

The Arch User Repository (AUR)

The Arch User Repository (AUR) is a community-driven repository that makes software not found in the official repositories easily accessible and installable for users of Arch Linux. Packages in the AUR are maintainable and contributeable by users.

Personalization

Arch Linux offers a simple and uncomplicated installation, allowing the user to make the majority of configuration choices. You start from scratch when building your system, selecting and setting up each component to suit your needs.

Documentation

The Arch Wiki, a useful tool for users, is one example of the outstanding documentation available for Arch Linux. The wiki includes extensive system configuration information as well as installation instructions.

Minimal Bloat

The minimalistic style of Arch Linux is one of its main selling points. By default, it installs only the most necessary software, but you can add or remove packages to keep your system as feature-rich or as light as you like.

Learning Experience

For individuals who wish to comprehend the inner workings of a Linux system, using Arch Linux can be instructive. The manual configuration and installation procedure aid users in becoming more knowledgeable about their system.

Not Beginner-Friendly

In comparison to certain other Linux distributions, Arch Linux is frequently regarded as being less beginner-friendly. For those who are unfamiliar with Linux, the installation procedure and manual configuration may be difficult.

Active Community

Through forums, mailing lists, and IRC channels, the enthusiastic and active Arch Linux user and developer community contributes to the project, maintains packages, and offers support.

Installing and configuring Arch Linux usually begins with a minimal installation, which you can then modify to suit your needs. Remember that people who enjoy doing hands-on system configuration and are at ease with the command line are the ideal candidates for Arch Linux.

Step1 on How to install Arch Linux

1a. Download Arch Linux’s.iso file from archlinux.org.

1b. Creating a live USB is possible using a variety of techniques. There are others, however the following is a list of useful ones:

1c. Plug in the USB drive of your choice, then start your computer using the installed media. A terminal prompt will show as soon as the system boots.

Step 2 on How to install Arch Linux: Get the Installation Ready

2a. Select your keyboard layout in the terminal prompt that opens. US denotes the American keyboard layout in the following example:

localectl list-keymaps | grep US

Output:

US US-acentos US-acentos.deadkeys US-acentos_nodeadkeys US-alt-intl US-altgr-intl US-apl US-apl.nodeadkeys

2b. Select a keyboard layout:

loadkeys US

Output: (If successful, there won’t be any.)

2c. If you have a Wi-Fi adaptor, use the following command to make it active:

iwctl

Output:

[iwd]#

2d. The device list command can be used to determine the name of your network adapter:

device list

Output:

wlan0

2e. You can search for Wi-Fi networks by using the ensuing command. Put your device’s name in lieu of name_of_your_wifi_adapter:

station name_of_your_wifi_adapter scan

2f. To view the list of accessible networks, run the following command. Once more, change name_of_your_wifi_adapter to the name of your device:

station name_of_your_wifi_adapter get-networks

2g. Join your network. Replace name_of_your_wifi_adapter with the name of your device, and name_of_your_network with the name of your network:

station name_of_your_wifi_adapter connect name_of_your_network

2h. Type the exit command to return to the Arch root.iso:

exit

2i. Using the command line, you can synchronize the Network Time Protocol (NTP) now that you have an internet connection:

timedatectl set-ntp true

2j. A list of servers known as the official Arch Linux mirror servers must be used to install packages. To set the fastest mirror list available to you, type the following command:

reflector -c ‘United States’ -a 12 – -sort rate – -save etc/pacman.d/mirrorlist

The following defines the above-mentioned command options:

  • The -c stands for country. If your country has a two-word name, you have to put them through single quotes, as the United States is in our example above.
  • The -a stands for the age of the servers. In our example, 12 denotes servers that have been updated in the last 12 hours.
  • The –sort portion is to sort the servers by speed.
  • The –save will let you save this information under etc/pacman.d/mirrorlist.

Output:

[INFO] Writing mirrorlist to ‘etc/pacman.d/mirrorlist’

2k. Use the command below to synchronize your mirror servers:

sudo pacman -Syy

Output:

:: Synchronizing package databases… core [###################] 100% extra [###################] 100% community [###################] 100% multilib [###################] 100%

2l. To list your disks so that you can partition them and install Arch Linux, use the lsblk command:

lsblk

Output:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi ├─sda2 8:2 0 48.8G 0 part / └─sda3 8:3 0 882.2G 0 part /home

Step 3 on How to install Arch Linux: Partition the Disk (Only for UEFI Systems)

NOTE: You can skip this step if you have a master boot record (MBR) system.

The Extensible Firmware Interface (EFI) partition and root partition are two partitions that must be created in this stage. Home partition use is not required.

Although the Master Boot Record (MBR) and GUID Partition Table (GPT) standards are supported by the Unified Extensible Firmware Interface (UEFI) system, you will partition the disk with the GPT label using gdisk due to the MBR partition’s size and number of partition restrictions.

3a. Use the gdisk command to create partitions on a UEFI system. Start gdisk by entering the command shown below, then choose your disk:

gdisk /dev/sdX

3b. Substitute the correct device identification for your drive (such as /dev/sda) for /dev/sdX.

Output:

GPT fdisk (gdisk) version 1.0.5 Partition table scan: MBR: not present BSD: not present APM: not present GPT: not present Creating new GPT entries in memory.

3c. Type the command o and hit the Enter key to create a new partition table.

Output:

Command (? for help): o This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): Y

3d. Create the EFI (Extensible Firmware Interface) System Partition (ESP) by typing the command n to make a new entry, choosing the default partition number, and providing the size (for instance, +512M for 512 megabytes), as follows:

+512M

Output:

Command (? for help): n Partition number (1-128, default 1): First sector (34-20971486, default = 2048) or {+-}size{KMGTP}: Last sector (2048-20971486, default = 20971486) or {+-}size{KMGTP}: +512M

3e, Select the partition number (for instance, 1), the ef00 code, and the command t to change the partition type to EFI System.

Output:

Command (? for help): t Partition number (1-128): 1 Hex code or GUID (L to show codes, Enter = 8300): ef00

This partition will be EFI. The EFI system partition’s code is ef00.

3f. Input the command n to create a new partition, choose the default partition number (for instance, 2), and hit Enter to use the available disk space to create the root partition.

Output:

Command (? for help): n Partition number (2-128, default 2): First sector (34-20971486, default = 1050624) or {+-}size{KMGTP}: Last sector (1050624-20971486, default = 20971486) or {+-}size{KMGTP}:

3g. Type the command w and confirm to write the modifications to the disk.

Output:

Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): Y

How to install Arch Linux Step 4: Partition the Disk (Only for MBR Systems)

NOTE: You can skip this step if you have a UEFI system.

A DOS disk label is necessary for Master Boot Record (MBR) systems.

Use the fdisk command to create partitions on an MBR system.

4a. Enter the command below to launch fdisk and choose your disk.

fdisk /dev/sdX

Output:

Welcome to fdisk (util-linux 2.35.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device /dev/sda doesn’t contain a valid partition table. Created a new DOS disklabel with disk identifier 0x9ac4eb15.

4b. Substitute the correct device identification for your drive (such as /dev/sda) for /dev/sdX.

4c. Type the command o and hit the Enter key to create a new partition table.

Output:

Command (m for help): o Created a new DOS disklabel with disk identifier 0x9ac4eb15.

4d. Type the command n, choose the primary partition type, then hit the Enter key to utilize the default partition size and number when creating the root partition.

Output:

Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p):

4e. Type the command w and confirm to write the modifications to the disk.

Output:

Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.

After the procedure has gone smoothly, you will format the partitions. Visit Step 5.

Step 5 on How to install Arch Linux: The base packages (for UEFI and MBR systems) should be installed

Base package installation is essential for a functioning system. Here are a few of the fundamental packages we’ll set up:

  • Additional firmware will be provided for the system Linux kernel via base Linux firmware.
  • (For Intel processors) Intel-ucod
  • (For AMD CPUs) AMD-UCOD
  • Vim or nano (or add-ons for your preferred text editor)

5a. The EFI System Partition (available on UEFI computers only) and the root partition must first be formatted. The File Allocation Table (FAT) system type must be used for the EFI partition. You must specifically construct the device name and a fat32 file system. Use these instructions:

mkfs.fat -F32 /dev/sdX1 # Format the EFI System Partition mkfs.ext4 /dev/sdX2 # Format the root partition

Output (UEFI systems):

mkfs.fat 4.1

Output (MBR systems):

mke2fs 1.46.3

Change /dev/sdX1 and /dev/sdX2 to the device identifiers that correspond to your partitions.

5b. Run the following command to mount the root partition.

mount /dev/sdX2 /mnt

5c. Output: (If successful, there won’t be any.)

Create the EFI directory and mount the EFI system partition if you’re using the UEFI system.

mkdir /mnt/boot mount /dev/sdX1 /mnt/boot

Output: (If successful, there won’t be any.)

5d. Execute the aforementioned command to install the base packages in the mount directory:

pacstrap /mnt base linux linux-firmware

Output:

==> Installing packages to /mnt

Step 6 on How to install Arch Linux: Launch the installation of Arch Linux

The preliminary procedures for carrying out an installation have been described so far in this Arch Linux installation tutorial. The actual installation will be the subject of the next procedures. Create the file system table, which stores the file mount points. The device will check this file each time it boots up to determine what needs to be mounted.

6a. Create a fstab file to specify how disk partitions should be mounted:

genfstab -U /mnt >> /mnt/etc/fstab

Output: (If successful, there won’t be any.)

6b. Integrate the new system’s root into it:

arch-chroot /mnt

Output: (If successful, there won’t be any.)

6c. To change the system’s time zone, execute:

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime

Substitute your region for Region, and your city for City.

The following command can be used to look up the configuration for your location. Specify the city where your system is located in place of your_city_name.

timedatectl list-timezones | grep your_city_name

Output: (If successful, there won’t be any.)

6d. Align the hardware and system clocks. /etc/adjtime file creation:

hwclock –systohc

(If successful, there won’t be any output.)

6e. Set the locale.gen file, which holds the system’s locales, to your preferences. The vim text editor is what we’re utilizing for this course.

6f. Edit the /etc/locale.gen file and remove the preferred locale’s comments. Find the locale you want to use by scrolling down and removing the # from the beginning of the line holding the language you prefer. Utilizing the:wq! command, save the file and close vim:

vim /etc/locale.gen

6g. Create the region’s options:

locale-gen

Output:

Generating locales… en_US.UTF-8… done en_US.ISO-8859-1… done

6h. Make a copy of the locale.conf file.

vim etc/locale.conf

6i. Type the location of your choice. Write the following down for the USA:

LANG=en_US.UTF-8

6j. Using the:wq! command, you can exit vim and save the file.

6k. Edit the /etc/hostname file to change the system’s hostname.

6l. The hostname part will contain the hostname of your device:

vim /etc/hostname

6m. Edit and set the /etc/hosts file:

vim /etc/hosts

6n. Include the lines below:

127.0.0.1 localhost ::1 localhost 127.0.1.1 myhostname.localdomain myhostname

6o. Substitute your preferred hostname for myhostname.

6p. Use the passwd command to set a password for the root user.

Step 7 on How to install Arch Linux: Install extra programs

Install any other software you desire, such as a desktop environment, a display manager, or other programs. Pacman is the default package manager in Arch Linux. Pacman works flawlessly with the Arch Build System (ABS) and has received excellent evaluations in all Arch Linux installation manuals you can find. You must use the -S option when using pacman to install a package.

7a. Using pacman, install packages as necessary:

sudo pacman -S package_name

Output:

resolving dependencies… looking for conflicting packages… Packages (1) package_name-1.0.0 Total Download Size: XX MB Total Installed Size: XX MB :: Proceed with installation? [Y/n]

7b. Substitute the package you want to install for package_name,

7c. Using pacman, install more packages:

pacman -S networkmanager network-manager-applet grub mtools dosfstools git linux-headers bluez-utils bluez pulseaudio reflector xdg-utils xdg-user-dirs cups

A list of every package that is offered is accessible on the Arch Linux website.

7d. Install the grub bootloader (only for UEFI systems):

grub-install -target=x86_64-efi -efi-directory=/boot/efi -bootloader-id=GRUB

7e. Grub needs a configuration file, which must be created.

grub-mkconfig -o /boot/grub/grub.cfg

7f. Installing the grub bootloader is only possible on MBR systems.

grub-install -target=i386-pc /dev/dsk

7g. Grub requires a configuration file to be created:

grub-mkconfig -o /boot/grub/grub.cfg

7h. To configure the Wi-Fi, make sure the network manager is enabled:

systemctl enable NetworkManager

Step 8 on How to install Arch Linux: Register as an Arch Linux user and choose a password

8a. The following command can be used to create a new user account:

useradd -m -G wheel username

Replace username with the username of your choice.

Output: (If successful, there won’t be any.)

8b. Set the user’s password:

passwd username

Username should be replaced with the one you created.

Output:

Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully

8c. Edit the /etc/sudoers file to provide the user administrative rights:

visudo

Output:

The visudo command will open the file in a text editor. Make the necessary changes and save the file to grant administrative privileges to the user.

Delete the line %wheel By eliminating the # symbol, ALL becomes (ALL) ALL.

Step 9 on How to install Arch Linux: Complete the installation of Arch Linux.

These were all the fundamental actions involved in installing Arch Linux. These installation instructions for Arch Linux is intended to be useful.

To finish the installation, unmount all partitions, install the bootloader, and reboot the computer.

9a. Putting in the bootloader:

bootctl install

Output (UEFI systems):

Copied systemd-boot binary. Created ESP at /boot.

Output (MBR systems):

Installing for i386-pc platform. Installation finished. No error reported. Generating grub configuration file… Found background: /usr/share/grub/background.png Found linux image: /boot/vmlinuz-linux Found initrd image(s) in /boot: initramfs-linux.img Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img Done

Replace /dev/sdX with the disk’s proper device identification.

9b. Use the following command to leave the chroot environment:

exit

Output: (If successful, there won’t be any.)

9c. Use the following command to unmount all partitions:

umount -R /mnt

9d. Use the below-listed command to restart your computer:

reboot

Output: (If successful, there won’t be any.)

Step 10 on How to install Arch Linux: Customizing Arch Linux

You will be able to choose Arch Linux as your boot option if the grub bootloader was installed properly. Using the login ID and password you made, you can log in. After logging in, you can carry on with the limitless Arch Linux configuration for which this operating system is renowned.

Depending on your preferences, the steps in the following installation guide for Arch Linux are optional but useful in most situations:

10a. One of the most popular display servers, X server, must be installed before a desktop environment may be installed.

sudo pacman -S xorg

10b. Select your desired desktop environment once the X server installation is complete.

        CINNAMON:
sudo pacman -S cinnamon nemo-fileroller

GNOME:

sudo pacman -S gnome gnome-extra

 XFCE:

sudo pacman -S xfce4 xfce4-goodies

 MATE:

sudo pacman -S mate mate-extra

10c. Set up plugins and codecs.

sudo pacman -S faac faad2 flac jasper lame libdv a52dec libtheora x264 gstreamer0.10-plugins libmad libvorbis wavpack

10d. Set up extra daily-use software. The command below will set up the following for this tutorial:

  • LibreOffice
  • Gedit (another text editor)
  • Skype
  • Firefox
  • Thunderbird (email client)
  • Pidgin (instant messaging client)
  • VLC (media player)
sudo pacman -S libreoffice gedit skype firefox thunderbird pidgin vlc

10e. Set up archive management programs:

sudo pacman -S tar unrar p7zip p7zip-plugins rsync

Final Thoughts

Now that you know how to install Arch Linux, you are fairly accustomed to it. Compared to other Linux distributions, installing Arch Linux may take more technical know-how, but it delivers a gratifying experience for those who value customization and control.

Also Read: How to Setup Jenkins on Linux Alma

Also Read: How to Fix 500 Internal Server Error

Also Read: 7 Arguments in Favor of a Hybrid Cloud Strategy

Also Read: What Is SDS, or Software Defined Storage? The advantages and applications

One thought on “An Arch Linux installation guide for Linux lovers

Leave a Reply

Your email address will not be published. Required fields are marked *