How to Install Arch Linux OS

How to Install Arch Linux OS

The ArchLinux operating system is one of the most famous distributions based on the Linux kernel and is an independent and multipurpose development based on the x86-64 GNU/Linux distribution that tries to provide the necessary platform for stable versions of most software. Arch Linux OS is a popular choice for experienced Linux users; It has gained attention among Linux enthusiasts due to its DIY (DO IT YOURSELF) feature that allows users to customize every aspect of their system.

Those interested in the Arch Linux operating system are usually worried because of the complexity in how to install and configure as well as work with this operating system; this platform indeed has a different installation compared to other operating systems because the users are responsible for the configuration of OS according to their desired, and if they use the default installation, the minimum basic system is provided to the users to start; while the complexity of installing and working with Arch Linux operating system is not to the extent that you will encounter problems; you only need enough knowledge and awareness to install and configure the Arch Linux operating system, and it is also an opportunity for average Linux users to learn.

By presenting this article, all your worries about installing the Arch Linux operating system will be solved because we are going to explain how to install the Arch Linux operating system step by step, and finally, you can easily install and run Arch Linux.

 

Introducing Arch Linux OS

Before we teach you how to install the Arch Linux operating system, we want to answer your most basic question about what Arch Linux is, and We will briefly introduce you to this practical and popular operating system. As we have already given a complete explanation about Arch Linux, this is a minimalistic and light Linux distribution operating system developed for professional GNU/Linux users and has tried to be user-friendly.

Arch Linux OS  is known for its simplicity, modernity, pragmatism, user-centricity, and versatility. By promoting a DIY attitude among users, this distribution has made it possible to customize features and change various aspects of the operating system according to the user’s needs.

Why Arch Linux OS?

Usually, after buying a Linux VPS, professional Linux users seek a distribution of Linux that can take complete control of the operating system and meet every need freely. Arch Linux has attracted many users with its flexibility and customization capabilities. Being open source and free, as well as being light, modern, and having a minimalist environment, are the advantages of Arch Linux that add to its popularity.

Arch Linux supports x86-64 architectures and strives to provide a modern and optimized system. Adopting a Do It Yourself (DIY) attitude, the Arch Linux operating system allows users to adjust every intricate detail. Finally, the operating system gives you complete control over its performance from when the ISO is loaded until the installation is complete.

As a result, in Arch Linux, your system does not have a native desktop, and controlling everything from the desktop environment to the details required for ease of work is the user’s responsibility. Arch Linux allows the user to use the latest features and updates based on the release model version and also, for taking advantage of the new features that the update offers, enter the following simple command and upgrade your system:

Pacman -Syu

What is the arch user repository?

In launching and installing the operating system Arch Linux, you will hear the term arch user repository, which we felt necessary to introduce you to, is a community-based repository for Linux packages developed by users.

The arch user repository is the only platform supported by Arch x86_64. The official package repositories and user repositories (AUR) contain 58,000 binary and source packages, which is close to Debian’s 68,000 packages. However, these two approaches perform differently in packaging.

AUR is a collection of user-generated PKGBUILD scripts for packages already available in the official Arch repositories. These PKGBUILD scripts simplify the process of installing from the source by verifying dependencies, listing them, and setting compatibility with the system architecture. Helper programs for AUR can also simplify package installation and download. However, due to existing security risks, such tools are never distributed through official channels. This is why the Arch development team avoids putting Additional software in the official distribution.

What is Pacman?

By default, packages are managed by Pacman. Pacman is a package manager that can boot your system with the latest updates, remove or restore packages, and even detect dependencies automatically. Arch Linux packages, designed specifically for the x86-64 architecture, are available from the Arch package repositories. Pacman can also be used to install and configure programs that are in tar.gz or tar.zst package formats.

Before version 4.0 0 0 Pacman, the Arch closure manager did not support signed closures. During the installation and download stages, packages and their metadata were checked for correctness, and the introduction of malicious code from compromised repositories or unauthorized mirrors was prevented.

The close signature option was included in Pacman 4.0 0.0 but was disabled by default. The developers made closing the signature necessary in November 2011. It was stopped by default on March 21, 2012, and reactivated in June 2012.

What is an arch build system(ABS )?

ABS is a program like a port that can compile source code into binary packages that can be installed with Pacman. ABS includes a set of shell scripts known as PKGBUILD that can be used to modify and compile any official Arch package. ABS also allows you to recompile the complete system with different compiler options (compiler-modified flags). Alternatively, pkg.tar.gz packages can be created from unofficial sources using the makepkg utility. In addition to these tools, Pacman allows you to manage and install new packages.

How to install Arch Linux OS

After getting familiar with the Arch Linux operating system and terms related to it, let’s get to the article’s main topic, which is the installation steps of the Arch Linux operating system. Before proceeding with the installation of the Arch Linux operating system, make sure that you have the following conditions:

prerequisites

  • At least 512 MB of RAM (2 GB of RAM is recommended.)
  • At least 2 GB of free disk space (we recommend 20 GB of free hard disk space for initial use with the desktop environment)
  • A blank DVD and the software and hardware needed to burn it
  • A USB with at least 2 GB of free space for storage
  • Having a system compatible with x86 64 (i.e., 64 bits)
  • Active internet connection
  • Familiarity with the Linux command line

Follow the instructions below to set up Arch Linux on your computer.

Step 1:Downloading Arch Linux OS

The first step starts with downloading the Arch Linux OS through the provided link and the Arch Linux download page. You can download the Arch Linux operating system in two ways:

  • Via BitTorrent
  • Via direct download

If you downloaded the operating system via BitTorrent, choose one of the following options:

  • Downloading the torrent file
  • Giving your BitTorrent app a magnet link

Alternatively, you can scroll the page until you find a mirror that is closer to your current location.

Step 2: Create a bootable Live USB or burn the Arch Linux ISO to a DVD

This step can create a bootable USB or DVD from the Arch Linux ISO file.

Create an Arch Linux Live USB

In order to create a Live USB of Arch Linux in the easiest way, the best option is to use the Etcher GUI program, which is compatible with both Linux and Windows operating systems.

You can use the dd command in the Linux system to create Live USB. Using the following command, Linux users can create a bootable USB drive (Live USB):

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync

In the command above, to create a Live USB, replace /path/to/archlinux.iso with the path of the downloaded ISO file and /dev/sdx with the path of your USB drive, and you can also enter the lsblk command to access your drive information.

Burn the Arch Linux ISO to a DVD

To install the Arch Linux operating system from DVD, you can use AnyBurn or Brasero tools to burn the downloaded operating system on a blank DVD.

Step 3: BootUp Arch Linux

  • After saving the Arch Linux ISO as a Live USB or burning this operating system to a DVD, reboot your computer while equipping your system with the Arch Linux installation media.
  • Pressing the F2, F10, or F12 keys as appropriate for your system allows you to select the device from which the system will boot.
  • By referring to the boot settings menu, specify the desired installation media between Live USB and DVD options. If Arch Linux is Launched, it will appear with the following image:

 

how install arch linux

  • Select Boot Arch Linux (x86 64) and press Enter to start the installation process.

Step 4: Set Arch Linux keyboard defaults

When installing Arch Linux, the keyboard layout is based on the US keymap by default. To use and display alternative formats and layouts, enter the following command:

ls /usr/share/kbd/keymaps/**/*.map.gz

The loadkeys command, along with the desired layout file name, applies the desired changes to the keyboard layout. To switch to the German keyboard layout, for example, you can type the following command:

loadkeys de-latin1

Step 5: Check and confirm online internet connection

Use the ping command to check the internet connection:

ping -c 3 google.com

When installing Arch Linux, you may find it helpful to read the Arch Linux wiki’s wireless configuration if you are using a wireless Internet connection.

Step 6: Enable Network Time Protocols (NTP)

To benefit from automatic system time updates over the Internet, you must enable the Network Time Protocol (NTP).

timedatectl set-ntp true

Also, to check the NTP service status, use the following command:

timedatectl status

Step 7: Partition the disks

First, list the disk drives that are accessible with the fdisk command:

fdisk –l

Then select the name of the disk you want to partition. Disk names are in the format /dev/sdX before, where X is the drive letter in this format.

fdisk /dev/sda

 

how install arch linux

We recommend that it is better first to delete the existing partitions on the disk using the d command to free up disk space and then to create a new partition using the n command.

Note: when checking the disk drive list, disregard disk drives ending in “loop” or “airoot.”

Run thecfdisk command to partition the drive:

cfdisk /dev/sdX

Note: Instead of the letter X, the drive letter of the disk you want to partition is substituted.

The next step is to use the arrow keys to specify dos for the label type, and press Enter to confirm.

install arch linux OS

After selecting a disk, a new window will appear, showing the free space available on that disk and allowing you to allocate it. To create a new partition on the disk, select the New option at the bottom of the screen and press Enter.

how to install arch linux OS

Specify the desired size for the partition (in GB) and then press Enter to confirm.

how to install arch linuxOS

 

Note: Remember that the swap partition needs a certain amount of free space (disk space at least two times the amount of RAM), So consider enough free space for this partition.

Set the partition to Primary when prompted and confirm with entering.

how to install arch linuxOS

 

Now both the available space on the disk drive and the newly created partition are visible.

At the bottom of the page, select Bootable and confirm by pressing Enter. This ensures that Arch Linux always uses the root partition when booting.

how to install arch linuxOS

In order to create a second partition using the remaining disk space, you need to follow the steps outlined above as described in the previous step. The new partition does not need to be booted, so select the Type option at the bottom of the screen and press Enter.

how to install arch linuxOS

Scroll down the list until you get to 82 Linux swap / Solaris. Press Enter to confirm. As a result, a swap partition is created by doing this step.

 install arch linuxOS

Click Write at the bottom of the screen to confirm the drive changes. Type the answer yes and press Enter.

 install arch linuxOS

To exit the cfdisk screen, select Quit and press Enter.

how to install arch linuxOS

Step 8: Create a Filesystem

Before you can install Arch Linux, you need to format the new partitions. To do this, create a file system on each partition.

First, create the ext4 file system using themkfscommand for the bootable partition:

mkfs.ext4 /dev/sdX1

 

how to install arch linuxOS, Create a Filesystem

Then, use themkswapcommand to set up a file system on the swap partition:

mkswap /dev/sdX2

install arch linux OS, Create a Filesystem

Step 9: Mount the file system

Run the following commands to mount the newly created file systems:

mount /dev/sdX1 /mnt 
swapon /dev/sdX2

Mount: Mounts the file system on the bootable partition.

Swapon: Activates the swap space file system.

X: belongs to the drive letter of the disk containing the partition.

install arch linux OS

 

 

Step 10: Check the mirror list to find a suitable mirror

Arch Linux downloads its files through a mirror during the installation process. If you try downloading files from a mirror far from your location, you will face installation failure due to the slow installation process. This issue has always been a challenge in installing Arch Linux because there is a messy list of so many mirrors that the first mirror at the top of the list is always automatically selected, which is not guaranteed to be ideal.

If you want to improve your download speed, the fastest mirrors should be prioritized in the mirror list.

  1. As a solution to solve this problem, first synchronize the Pacman repository so that you can install and run the software:
pacman –Syy

 

install arch linuxOS

  1. After setting up a reflector, the mirror can be updated and organized based on download speed. To add a reflector, enter the following command:
pacman -S reflector

 

how to install arch linux OS

  1. If you feel the need, you can create a backup copy of the mirror list using the following command:
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
  1. Utilize the reflector to update the list of mirrors:
reflector -c "XX" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist

Note: You must enter your country code instead of XX; for example, if you are in the UK, replace it with the UK.

Important: You will access the mirror list via /etc/Pacman.d/mirror list.

Step 11: Install Arch Linux

Use the pacstrap script to install Arch Linux on the bootable partition:

pacstrap /mnt base linux linux-firmwar

The duration of the installation of the operating system depends on the speed of your download.

Step 12: Configure Arch Linux

After completing the Arch Linux installation process, it is necessary to configure.

Create fstab file

The fstab file determines the prioritization and how to mount disk partitions, remote devices, blocked devices, and other data sources in the file system. To create the fstab file, run the following command:

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

Use Arch-Chroot and select the mounted disk as the root

To switch to a freshly installed Arch Linux system, use the arch-chroot command and enter the installation disk as root:

arch-chroot /mnt

Specify the time zone

  1. The first step is to list all available time zones:
timedatectl list-timezones
  1. Set your time zone and write its name.

Note: You can exit the list by using the command q or Ctrl+C.

  1. Call the following command:
timedatectl set-timezone Time/Zone

To adjust, replace Time/Zone with the name of the desired time zone (for example, Europe/Paris).

Zone setting

Locale settings determine how the system displays text, dates, numbering, and the currency used, and you can also change your system language.

First, to check and find the name of your location, you need to open the file locale.gen, which contains different regions of the world. For this purpose, enter the following command:

sudo nano /etc/locale.gen

Then uncomment their names to use and enter your desired local name or other items you wish to use.

Exit the desired environment by typing Ctrl + X and type Y to save the changes.

Create a file containing the settings for your region by entering the following command:

locale-gen
echo [locale_name] > /etc/locale.conf

Replace the desired locale name in the [locale_name] field.

Note: You can change the settings related to the location and time zone of the operating system later.

Setting the Hostname file

  1. The first step is to create the Hostname file and then add your hostname to that file by typing the following command:
echo [your_hostname] > /etc/hostname
  1. Create a host file with the Touch command:
touch /etc/hosts

Add the following content to the host’s file you created:

127.0.0.1      localhost 
::1        localhost 
127.0.1.1 [your_hostname]

Enter the following command to enable Dynamic Host Configuration Protocol (DHCP):

systemctl enable dhcpcd

Set Root Password

To set a new root password, use the passwdcommand:

Passwd

After entering the passwdcommand, you will be prompted for a new password to confirm the changes.

Step 13: Install Grub Bootloader

To install Grub Bootloader according to whether your system supports UEFI or not, you can use two methods:

Launch GRUB Bootloader on a non-UEFI system

  1. Add GRUB bootloader packages with the help of the Pacman manager:
pacman -S grub os-prober
  1. Start installing GRUB bootloader:
grub-install /dev/sdX

Note: replace X with the letter of the driver on which GRUB is to be installed

To create a GRUB configuration file, you can enter the following command:

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

Install GRUB Bootloader on a UEFI system

1. First, use Pacman Manager to install GRUB bootloader packages:

pacman -S grub efibootmgr

2. Next, you need to create a directory for the EFI partition:

mkdir /boot/efi

To create a directory in Linux using the mkdir command, our article can guide you completely.

  1. After that, mount your bootable partition in the new directory you created:
mount /dev/sdX1 /boot/efi

Note: replace X with the letter of the disk drive on which the partition is located.

  1. Install GRUB by running the following command:
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
  1. At this stage, create the GRUB configuration file using the following command:
grub-mkconfig -o /boot/grub/grub.cfg

 create an additional user:

It is better to create more than one root user account in the system you have booted. Because if you have only one root user account, you can access the root user account without needing to authenticate for each login. But if you have more than one root user account, authentication happens every time you log in, and also The system’s security is also provided.

Therefore, if you want to create an additional user, you must use theSudocommand. If you haven’t installed the sudo package yet, do it with the following command:

pacman -S sudo

In the next step, you need to give permission to create a new user and specify a unique name for the new user, which we have considered asam here:

useradd -m asam 
passwd asam

For the new user, specify a password and confirm it. So you have added the new user to a select group with specific permissions. It is necessary to be a member of the wheel group for the extraordinary performance of a user:

usermod -aG wheel,audio,video,storage asam

The last step is to uncomment the line in the visudo file that contains the word “wheel.”

This action typically launches the VI editor. Therefore, we must force the use of nanotechnology for:

EDITOR=nano visudo

Finish your work by saving the changes and then exiting the file.

Installing the desktop environment (GNOME)

To get started, you need to start the X server. Use the following command to install Network Manager and Xorg as display servers.

pacman -S xorg networkmanager

Then use the following command to install the GNOME desktop environment on Arch Linux:

pacman -S gnome

Finally, you must enable GDM Arch Display Manager along with Network Manager.

systemctl enable gdm.service
systemctl enable NetworkManager.service

Step 14: Exit the Arch-Chroot Environment and reboot

you exit the Arch-Chroot Environment by entering the following command:

Exit

Finally, use this command to unmount the root partition:

umount /mnt

or

umount -l /mnt

Finally, shut down your system:

shutdown now

Then you restart the system:

sudo reboot

Step 15: Log in to Arch Linux

Make sure you disconnect the live USB before rebooting the system. If the installation is successful, upon system reboot, the Grub loading page and GNOME login prompt will appear, giving you the option to load Arch Linux. To start uploading, please press Enter and then enter your custom password to access your account.

intsall arch linux OS

FAQ

Evidently, what will be placed on the hard disc is essentially a LiveCD, but at least it can boot a system, copy files, and run some applications; thus, installing Arch Linux without being online and only with a CD is possible, but it will take time.

Unlike Debian OS, where graphics drivers are automatically installed during a standard desktop installation, Arch Linux requires user intervention, and you must manually install the necessary drivers. But it is not a difficult task; This issue is solved with a script to identify the hardware and deploy the corresponding drivers.

The last word on installing the Arch Linux operating system

If you have followed these steps correctly with us, now you have certainly succeeded in installing the powerful Arch Linux operating system, and you are using the popular Arch Linux operating system on your system.

It may be that the process of installing the Arch Linux operating system is different from other Linux distributions. It is not as easy as them, but you have seen that with a bit of patience, precision, and knowledge, you can enter the wide and exciting world of Arch Linux and use and enjoy its capabilities and power for different purposes.

If you have faced a problem while performing a step and a step is not clear to you, ask us your questions in the comments section. We hope this educational article was helpful for you and guided you in the easiest way to install the Arch Linux operating system.

Leave a Reply

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