How to Install Arch Linux On Virtual Box?


Arch Linux is a lean general-purpose Linux distribution that is always up-to-date. Like the other Linux distributions, Arch Linux does not receive one or two updates per year. In fact, it has some smaller frequent updates that keep your Arch Linux system up-to-date. It is popular among DIY enthusiasts and expert Linux users.

 

How to Install Arch Linux?

To get Arch up and running, start by downloading one of their monthly ISOs. Once booted, you’ll be facing a blank command line prompt. On installation of Arch Linux, you get a minimal base system with few configurations. So, it’s totally on you to configure everything.

Next, you have to navigate through a series of steps on the command line to land yourself a functional version of Arch on your computer. It’s a good chance that you overlook a step or make a choice that you might later regret. This is why installing Arch Linux can be hard, but it can also allow you to learn more about Linux if you already have some experience.

Following the Arch installation, you’re left with a basic system. You have to manually install a broad selection of applications. After the Arch installation is finished, you have to deal with tasks like configuring Wi-Fi settings or installing graphics drivers. Although the newest Arch Linux ISO file comes with a much easier installer which helps you to set up these settings along the way when you are installing Arch.

In this tutorial, you will get a comprehensive step-by-step guide on installing and setting up Arch Linux. This guide also covers the steps of installation of Arch Linux on a virtual machine.

 

Arch Linux Installation Requirements

Before starting the installation of Arch Linux, ensure you have the following prerequisites:

  • You’ll need a computer compatible with x86_64 (64-bit) and equipped with the latest version of Virtual Box.
  • At least 512 MB RAM (But it’s recommended to have 2 GB RAM) for the Virtual Machine to be created.
  • A minimum of 2 GB free disk space (suggesting 20 GB for basic usage with a desktop environment)
  • A working network connection
  • Good grasp of the Linux command line.

Once you’ve confirmed these requirements, let’s proceed with the Arch Linux installation.

 

1. Download the Arch Linux ISO File

Before you can continue, first download the ISO file of Arch Linux. You can download the torrent or any direct file using the worldwide available server.

2. Steps for Arch Linux Installation on Virtual Machine

Virtual machine is a software to test different Linux distros and systems. If you are one of those who find it difficult to install Arch Linux on a bare Linux system, then we would recommend you install it on a virtual machine. This will help you to get used to the installation procedure of Arch Linux and you can also run some initial commands to get real time hands on it.

Open the virtual machine on your system and select the Add option. This option will help you to add an Arch Linux installation medium on a virtual machine.

Give a name to your Arch Linux virtual machine and select a directory to install the Arch Linux on your system.

A screenshot of a computer Description automatically generated

Next, allocate 4 GB of RAM and preferably more than 2 CPUs for the Arch Linux virtual machine.

A screenshot of a computer Description automatically generated

Now allocate some space of your system to Arch Linux. Ideally, this space should lie between 15 GB to 20 GB.

A screenshot of a computer Description automatically generated

Now, the virtual machine will show you a quick summary of all the settings that you selected. Quickly review it and click Finish.

A screenshot of a computer Description automatically generated

Now select the newly added Arch Linux virtual machine and click the Start button.

A screenshot of a computer Description automatically generated

If you have not previously selected the ISO file, you will be prompted to select the ISO file that we downloaded at the start of this tutorial.

A screenshot of a computer Description automatically generated

After that, your system will successfully boot into the Arch Linux installation medium.

3. Boot Arch Linux From ISO File

Now your system is booted from Live ISO. To install Arch Linux on a virtual machine, you should select Arch Linux install medium (x86_64, BIOS) from the boot menu.

If you need speech support during the installation, you can choose Arch Linux to install medium (x86_64, BIOS) with speech instead. This installation media has additional accessibility features available for visually impaired users.

Once you are booted into the installation media of Arch Linux, select Arch Linux and press Enter to start the installation.

A screenshot of a computer Description automatically generated

Now, your system has successfully booted into the Arch Linux installation setup. Run the below command to increase the font size for more clarity:


A screenshot of a computer Description automatically generated

4. Configure Network Configuration

In the first step, you need to configure the network connection. For that, you have to ping a website to check your network status:


A black screen with white text Description automatically generated

If you see any error like a temporary failure in name resolution, first enable the network configuration.

Type the iwctl command to connect with a wireless network. You can also set these settings after installation. In simple words, it can be done in both modes. Like in interactive mode or command line modes.

Type iwctl to start an interactive prompt:


Type the device list to get a list of Wi-Fi adapters on your system:

Type the below command to list all available Wi-Fi networks:
station wlan0 get-networks

You will get a list of networks available nearby.

Now type the above station command followed by the network name you want to connect:

station wlan0 connect Network_Name_Here

You will be prompted to enter the network passphrase.

If the connection is successful, exit the iwd mode:


Now, your system is successfully connected to the wireless network. You can again ping any website to test your connectivity.

5. Synchronize Packages and Install Arch Linux Keyring

Next, run the pacman -Sy command to synchronize the package databases from the repositories specified in the pacman.conf file. Specifically, the -S flag synchronizes packages and the -y flag refreshes the package list from the servers before installing anything.


A black background with white text Description automatically generated

Next, synchronize the package databases and upgrade or install the Arch Linux keyring. The archlinux-keyring package is used by pacman to verify the authenticity of packages during system upgrades and installation processes.

It contains the PGP keys that can check the authenticity of the signed packages and their databases.

pacman -Sy archlinux-keyring

A screenshot of a computer Description automatically generated

6. Install Arch Linux

Now, to enter the Arch Linux installation menu, enter the archinstall command. The archinstall command automates the installation of Arch Linux. It guides users through the installation process.


A black screen with white text Description automatically generated

The archinstall command has a pre-configured guided installer. It also has a set of predefined profiles that can be selected during the installation process. After entering the guided installer, you will see a screen similar to this:

A screenshot of a computer Description automatically generated

The guided installer for Arch Linux provides several options for the installation process. Here’s a brief description of each option:

 

Option Description
Archinstall language Option to select the language for the installation process.
Mirrors It refers to the repositories from which the installation system will download the required packages. Set its value to default. You can also choose the mirrors closest to your location for faster downloads.
Locales System’s regional and language settings, such as date, time, and currency formats.
Disk configuration This step involves partitioning the disk for the installation. Here, you can define the disk layout for the root and swap partitions.
Bootloader This option allows you to select the bootloader. Here, the system uses Grub as the bootloader, which is a common choice for Linux machines.
Swap This option checks whether a swap partition will be created or not. A swap partition or virtual memory in Linux systems.
Hostname Name of the computer/system on the network.
Root password Here, you can set the password for the root user (administrative user) on Linux.
User account A regular user accounts for daily system usage.
Profile Using this option, we can select a pre-configured set of packages and options to install alongside the base system.
Audio Settings to install an audio server.
Kernels Settings to select the kernel to be installed. In this case, it’s Linux, which is the default kernel for Arch Linux.
Additional packages Here you can specify any additional packages to install.
Network configuration This option is for configuring the network settings, such as setting up a wired or wireless connection.

 

All these above-explained options give you the freedom to install and customize the Arch Linux setup.

7. Partition the Disk

Next, we have the Disk configuration option. Here in this option, you can select the different partitioning layout for Arch Linux installation. Press the Enter key to select this option.

A screenshot of a computer Description automatically generated

Inside the disk configuration settings, you will be prompted to two options: Use a best-effort default partition layout and Manual Partitioning.

If you choose the default partition layout, the installer will create partitions automatically based on the disk size and other factors.

A blue and white rectangle with white text Description automatically generated

However, if you proceed with the manual partitioning, you will have more control over the partition layout. In this way, you can customize, create, delete, and modify partitions.

Inside manual partitioning, you can see all the available disk space. As you can see, we have given 20 GB of space to our virtual machine. You can select this free space to create a partition.

After selecting the disk, you can create a new partition for your system. It also gives you the option to suggest a partition layout or continue with the default partition layout.

A black background with a black square Description automatically generated with medium confidence

But remember, if you are dual booting a system be careful while deleting the old partition, it’s better to install the system on a whole new disk rather than one which already contains a system.

Now, if we continue with the default best partition layout option, we will be asked to select the filesystem for your main partition. A file system controls the process of storing and retrieving data from the storage drive. It affects system performance, reliability, security, and efficiency.

Here you will get four choices such as btrfs, ext4, xfs, and f2fs.

Btrfs: This file system is good for advanced features like resizing, space stats, snapshots, and checksumming. It also supports subvolumes, compression, and encryption. It is the best choice for modern hardware and Linux systems. We will also proceed with the same file system.

Ext4: This file system can handle various storage needs and protect data with advanced permissions for files and directories. It is suitable for formatting storage devices, such as volumes and hard drives.

XFS: This file system is good for large file transfers and parallel I/O operations. It supports larger file sizes and volumes. The XFS file system is a good option on Linux, where you need high-performance computing.

F2FS: This flash file system was specifically designed by Samsung Electronics for the Linux kernel. It was designed for NAND flash memory. F2FS is a good choice for installing Linux on devices like eMMC, SSD, NVMe, SDCard, and Flash-based USB.

A black screen with white text Description automatically generated

Next, select the default structure for the btrfs subvolumes. After selecting the default option, Arch Linux will set up the recommended default structure for these subvolumes. If you select No, you’ll have to manually configure the subvolumes later.

A black background with white text Description automatically generated

Finally, the system file structure is set. Next, we have the Bootloader, Swap, and Hostname settings. Grub is the default bootloader for most of the Linux distribution, so we will use the same. Here the Swap partition is enabled, this Swap partition helps the Linux system to create a virtual memory. You can also customize the default Hostname for your Arch Linux system.

A screenshot of a computer Description automatically generated

8. Set up Hostname and Password

Next, we have to add a root user and set up a password for it. We are continuing with the default hostname, but you can also set a custom name here. To set up the root password, select the settings and press Enter.

A screenshot of a computer Description automatically generated

Type the desired root password for your system. You will not see anything being typed physically on the screen, just simply enter the password, and hit enter. Remember this password, this is what you will use to get into your Arch Linux system.

You can skip this step if you have no intention of setting a root password.

A black screen with white text Description automatically generated

Next, create a user account and add a user to your system.

A screenshot of a computer Description automatically generated

Select Add a user and hit Enter.

A screenshot of a computer Description automatically generated

Give sudo privileges to the user.

A black screen with white text Description automatically generated

A list will prompt which displays all the users on the system. Review the user list and select the exit option.

A black screen with white text Description automatically generated

 

9. Install a Desktop Environment on Arch Linux

Linux’s distributions come with their default desktop environments. Similarly, Arch Linux has a total of 13 desktop environments that are available in its official repositories. Some of these include Budgie, Cinnamon, and GNOME.

To choose a suitable desktop environment for your Arch system. Enter the Profile settings.

A screenshot of a computer Description automatically generated

Select the Type option.

A black background with a black square Description automatically generated with medium confidence

Here you will see the four pre-programmed default profiles.

Desktop: This profile includes different types of desktop environments, graphical user interface components, and additional software. If you want a handy desktop environment, then select this type. We will also proceed with the same type.

Minimal: The minimal profile contains only essential components for a functional system. It is a lightweight option and suitable for users who want to build their systems with custom software and applications.

Server: The server profile is specifically for the server environments. Most of the time-server profiles don’t have the graphical components. It focuses much on the necessary tools and packages required for running and managing a server.

Xorg: This profile specifically sets up the X Window System (Xorg). It is essential for running graphical environments. If you choose this profile, you’ll need to install and configure a desktop environment or window manager separately.

A screenshot of a computer Description automatically generated

After selecting Desktop, you will see the list of all available desktop environments for Arch Linux. We will continue with Gnome as it is the best desktop environment available there.

A screenshot of a computer Description automatically generated

After selecting the Gnome, the installation window will prompt you to select the suitable graphic drivers. Hit the Enter key to open the graphic settings menu.

A black screen with blue and white text Description automatically generated

As I am installing Arch Linux on the virtual box, we will proceed with the VMware/VirtualBox open-source drivers. If you are not sure about what to select, simply proceed with the default All open-source settings.

A screenshot of a computer program Description automatically generated

Review all the selected settings and select the Back option.

A screenshot of a computer Description automatically generated

Next, we have to select an audio server from the list. For that, we have the audio server, Pipewire, and Pulseaudio. The Pipewire is the updated audio server, and it is designed to replace not only the Pulseaudio server but also the JACK.

So proceed with the Pipewire audio server.

A black background with a black square Description automatically generated with medium confidence

 

10. Set up Linux Kernel and Additional Settings

In the next option in line, we have to select the Kernel. We have four kernel versions available:

linux: It is the stable Vanilla Linux kernel for Arch Linux, which is used most of the time. This option is the standard and most preferable, so we will also proceed with this.

linux-hardened: This kernel is a security-focused Linux kernel that includes patches to reduce security risks and exploits. His kernel is suitable for older hardware and may not work on the latest hardware.

linux-lts: It is the LTS or Long-Term Support kernel, and is also similar to the first option (linux). Inside this version of the kernel, you will get a more stable release of software than the standard Linux kernel edition. It also has long-term support compared to the stable one.

linux-zen: This kernel edition is designed for responsiveness in interactive systems. It is the result of the collaboration of kernel hackers to provide users with a stable running kernel for daily use.

A black screen with white text Description automatically generated

Next, we have the additional packages option. Using this option you can install any additional packages like sudo, vim, git, and neofetch.

A screenshot of a computer Description automatically generated

For installation, simply type the package name with each of them being separated by a space.

A black screen with white text Description automatically generated

The Arch Linux installer has a basic network configuration step. Press the Enter key to open network configuration settings.

A screenshot of a computer Description automatically generated

Inside the network configuration, you can either configure the network manually or select the automatic NetworkManager. An automatic network configuration option is recommended for most of the Arch Linux installations.

One more option you get is to copy ISO network configurations. This option copies all the network configurations from the Arch Linux ISO to the installation. This option is usually used when we want to replace the already installed network configuration in the system.

A black and white screen with white text Description automatically generated

Next, select the local time zone.

A screenshot of a computer Description automatically generated

Now review all the selected settings, then enter the Install option.

A screenshot of a computer program Description automatically generated

Arch Linux installation has started, press the Enter key to proceed. Wait for a few minutes till the Arch Linux installation is completed.

A screenshot of a computer program Description automatically generated

In this step, the system is asking to chroot into the newly created installation. Select the yes (default) option to choose the new installation. It will help the system install things like bootloaders.

A black screen with white text Description automatically generated

Arch Linux has been successfully installed. Enter the neofetch command to check installed system information.

A screen shot of a computer screen Description automatically generated

Here you can install additional packages and software like LibreOffice and Firefox. Use the pacman package manager tool and type the name of the software and packages you want to install with a space between their name. Then press the enter key to proceed.

A screenshot of a computer program Description automatically generated

Now our installation is completed. Exit the installer and shut down your virtual machine.

A screenshot of a computer error Description automatically generated

 

11. Reboot Your Virtual Machine

Restart your virtual machine. Now the system will automatically boot into Arch Linux. Now you have to do some settings before you start your day with Arch Linux.

Select Arch Linux virtual machine and open its settings.

Go to General>Advanced settings. Select both Clipboard and Drag and Drop settings to bidirectional. This will help you to exchange data between both the virtual machine and your main system.

A screenshot of a computer Description automatically generated

Arch Linux is successfully installed inside the directory which we specified in the first step. Now we can remove the disk from the virtual drive.

Important Note

You might think that deleting the ISO file from your PC will also delete the Arch Linux distros from your virtual machine. But this is not true. The ISO file and the Arch Linux distros are separate. Arch Linux only gets deleted from your virtual machine when you delete the directory (D:/Arch Linux) where you installed it. If you delete the ISO file, and it is not in the same directory, nothing will happen to your installation.

One more thing to keep in your head, if you are using a portable or plug-and-play version of any Linux distro, then deleting the ISO file will also remove it from your virtual machine.

A screenshot of a computer Description automatically generated

Now restart your virtual machine.

A screenshot of a computer Description automatically generated

Press Enter to start.

A screenshot of a computer Description automatically generated

Now enter the root password, which you set during the installation process.

A screenshot of a computer Description automatically generated

And that’s it. Arch Linux is ready for use.

A screenshot of a computer Description automatically generated

 

Install Guest Addition Arch Linux Virtual Box

Guest addition installation on your virtual machine helps you to synchronize both the VM and the Host. It will improve the performance of your VM with more usability of a guest operating system.

To install guest additions, open the console on Arch Linux and type the command to update the package database:


A black screen with white text Description automatically generated

Next, type the given command to install the Linux kernel headers. These are required for building kernel modules:

sudo pacman -S linux-headers

Now, select the Input option of the VirtualBox menu bar. From there, select Insert Guest Additions CD Image. This will mount the guest additions ISO file as a virtual CD-ROM drive.

Now, open the file manager on Arch Linux and navigate to the /run/media/username/ directory. You can also directly select the virtual box guest addition from the mounted drive. This is where the guest additions files are located.

Copy all the files from this subdirectory and paste them inside a new directory on your system, such as Documents or any other.

Right-click and open the current directory where you have pasted the guest additions files in a terminal.

A screenshot of a computer Description automatically generated

Run the below-given command to list files inside the current directory:


To make the guest additions installer executable, run:

chmod 777 VBoxLinuxAdditions.run

Now, run the following command:
sudo ./VBoxLinuxAdditions.run

This will start the installation process of the guest additions.

Your full-screen option is successfully updated. Now, your Arch Linux screen will automatically adjust according to the VirtualBox window size.

 

Conclusion

So, the step-by-step guide for Arch Linux installation has ended. It was a long guide, but not that difficult. You can easily set up Arch Linux by just following the Arch Linux installation media. First start by downloading the ISO file and creating a virtual machine. Start the virtual machine and enter the installation media from the BIOS menu of your system.

After you enter into the installation media, configure all the settings from the disk partition to the kernel and Grub selection. Inside the setup, you can also install additional packages and set up a root password for your system. It also allows you to manually add users to your system. After that, you have to select a desktop environment. Once all settings are configured, press the Install option to begin the Arch Linux installation.

This article also covers the steps needed for Arch Linux installation on a virtual machine. At the end of this guide, a quick tutorial on setting up the Arch Linux guest addition is also given. Read the article to get a comprehensive guide on Arch Linux installation.

 

Categories