In 2022, the world will be a very different place. The technology that we take for granted today - like virtual reality and artificial intelligence - will be commonplace. And, of course, there will be new technologies too - like blockchain and AR/VR. So it’s no surprise that many people are looking into ways to use Linux on their virtual machines. And one of the most popular distributions is Arch Linux. Why Arch? There are a lot of good reasons to choose Arch Linux as your virtual machine operating system. First of all, it’s very lightweight and easy to use. You can install it on a virtual machine in just a few minutes using the Arch Install Scripts. Another great thing about Arch is that it has a wide range of features and applications available from the community repository. This means you can find exactly what you need to do your job without having to install anything extra. Plus, there are always new updates available so your system is always up-to-date. So if you’re looking for an easy-to-use distribution that has plenty of features and applications available from the community, then Arch Linux is definitely worth considering for your next virtual machine installation! ..


Except for this time I’m detailing the next steps of setting up the main system environment.

1 – Initial Login

Log into the system we created in the previous post this time on the actual file-system we generated (i.e. without the boot media), using the one and only root account currently in existence. Test to see if you have a working internet connection again by using Ping.

1 – Initial Login2 – pacman. conf3 – User Creation4 – VMware Tools5 – XorgDisplay & Window Manager

[alert-announce]

$ ping -c 5 www. google. co. uk $ ping -c 5 8. 8. 8. 8

[/alert-announce]

If you get ping: unknown host www.google.co.uk or connect: Network is unreachable for either of these commands then you need to do the rest of this step (1).

If everything looks fine and you are sending plus receiving through ping with a working internet connection, then move on to step 2 instead.

Find your Ethernet interface name (virtual VM shared host connection interface in this case) using:

[alert-announce]

$ ip link

[/alert-announce]

If you are unsure of the name, your Ethernet interface you are looking for is likely to start with the letter “e”, and unlikely to be “lo” or start with the letter “w”.

In my case, my interface was named “eno167777736”. So I’ll use that as the example here.

Next, make sure the interface is up and running with this command syntax:

[alert-announce]

$ ip link set eno16777736 up

[/alert-announce]

Substituting the interface name ID with your own.

Then start and enable dhcpcd.service with systemctl.

[alert-announce]

$ systemctl enable dhcpcd. service $ systemctl start dhcpcd. service

[/alert-announce]

Attempt a ping once again and this time it should succeed, with the internet connection working correctly.

If despite this there’s no change, try the previous commands again, but this time specifying the interface name in the command like this:

[alert-announce]

$ systemctl enable [email protected] $ systemctl enable [email protected]

[/alert-announce]

If still, no joy here are some resources that might prove useful. Remember these links are not in the context of a VM installation, however.

No wired internet after fresh arch install. Arch Linux Beginner’s Guide – Establishing an internet connection Arch Linux Beginner’s Guide – Network Configuration

2 – pacman.conf

If using a 64-bit system begin editing the /etc/pacman.conf with nano.

If not using a 64 bit system then move onto Step 3 now.

[alert-announce]

$ vi /etc/pacman. conf

[/alert-announce]

Now uncomment the two following lines in this file:

[alert-announce]

[multilib] Include = /etc/pacman. d/mirrorlist

[/alert-announce]

After doing this write/save to the file and exit it.

When back at the shell prompt sync and refresh repositories with pacman by running:

[alert-announce]

$ pacman -Sy

[/alert-announce]

3 – User Creation

Make another user account here so root isn’t the default account in use all the time (bad practice to do so), whilst at the same time adding it to some groups.

[alert-announce]

$ useradd -m -g users -G wheel,storage,power,sys,adm -s /bin/bash scarlz

[/alert-announce]

Set the password for the new user that has just been created.

[alert-announce]

$ passwd scarlz

[/alert-announce]

Install sudo with pacman if it did not install as part of your previous base Arch set-up.

[alert-announce]

$ pacman -S sudo

[/alert-announce]

If you ever want to see a list of packages related to a search term, you could type the following command, where the package name specified at the end is the “search term”.

[alert-announce]

$ pacman -Ss sudo

[/alert-announce]

Now sudo is installed on the system we need to enable it for users belonging to the wheel group in the sudoers file to gain privileges.

[alert-announce]

$ EDITOR=vi visudo

[/alert-announce]

Find the “user privilege specification” section and uncomment the following line so it looks like this:

[alert-announce]

%wheel ALL=(ALL) ALL

[/alert-announce]

After doing so hit CTRL+X then y and then ENTER.

I’m also going to install bash-completion here to help out before moving onto the next step.

[alert-announce]

$ pacman -S bash-completion

[/alert-announce]

4 – VMware Tools

I’m using Vmware as my virtualisation software in this instance, so here’s how to install the official VMware tools.

[alert-announce]

$ pacman -S base-devel net-tools linux-headers

[/alert-announce]

Press ENTER for the default All if prompted by the base-devel package.

Some Xorg Vmware related dependencies.

[alert-announce]

$ pacman -S xf86-input-vmmouse xf86-video-vmware mesa

[/alert-announce]

Then, create bogus initialization directories for the installer:

[alert-announce]

$ for x in {0. . 6}; do mkdir -p /etc/init. d/rc$x. d; done

[/alert-announce]

The VMware installer then needs to be mounted in our Arch system:

[alert-announce]

$ mount /dev/cdrom /mnt

[/alert-announce]

If you have errors here make sure your VMware software (Workstation in my case) has the latest tools downloaded and updated, and try running VMware “as an Administrator” if using Windows.

After this is successfully mounted extract it to /root .

[alert-announce]

$ tar xf /mnt/VMwareTools*. tar. gz -C /root

[/alert-announce]

Run the perl script to install the extracted VMware tools.

[alert-announce]

$ tar xf /mnt/VMwareTools*. tar. gz -C /root

[/alert-announce]

$ perl /root/vmware-tools-distrib/vmware-install.pl

You can safely ignore the following build failures:

VMNEXT 3 virtual network card “Warning: This script could not find mkinitrd or update-initramfs and cannot remake the initrd file!”

Reboot the Virtual Machine:

[alert-announce]

$ systemctl reboot

[/alert-announce]

Log in and start VMware Tools:

[alert-announce]

$ /etc/init. d/rc6. d/K99vmware-tools start

[/alert-announce]

5 – Xorg

“Xorg is the public, open-source implementation of the X window system version 11. Since Xorg is the most popular choice among Linux users, its ubiquity has led to making it an ever-present requisite for GUI applications, resulting in massive adoption from most distributions.”

Now comes the part where we are going to install X server.

Install Xorg and some of its companion packages using pacman once again like so:

[alert-announce]

$ pacman -S xorg-server xorg-xinit xorg-server-utils

[/alert-announce]

Finally, in this section install the default X environment to ensure that all the x-org components we’ve installed prior to this are functioning correctly.

[alert-announce]

$ pacman -S xorg-twm xorg-xclock xterm

[/alert-announce]

Type startx to run the X environment.

[alert-announce]

$ startx

[/alert-announce]

Another forthcoming post will go into depth on how to install a tiling window manager (bspwm) and configure .xinitrc to serve as a display manager. With the exception of this being done in the context of a live system, and not a VM.

Alternatively, find and research another window manager/desktop environment from the Arch-wiki to setup and install.

Arch-wiki Window Managers Arch-wiki Desktop Environments