[Linux]Arch Linux installation until xfce desktop

This is a personal note for me if I need to install Arch Linux on virtual box again.

Arch Linux is unlike Linux Mint, it only comes with a shell after installation you will need to install the software you need by using pacman.
Grand reference is to use the Arch Wiki.

Live CD

There is no installation guide wizard here, anything you need to do here has to do by typing commands.

Prepare the hard disk

My setup for the virtual machine in virtual box is not going to be overly complicated, there are guides that introduce different partitions for various directories, but on this note everything will be in “/” in one partition. The more common partitions I saw is to create three partition, such as /dev/sda1 for “/boot”, /dev/sda2 for “/” another is /dev/sda3 for swap, however recently I found that swap is not really necessary as Arch is very light weight the free softwares I will be installing are very light weight and besides my laptop has enough memory to run the programs and my virtual machine is not going to do any rendering.


I am using the legacy mode bios not the UEFI, hence I choose dos not gpt.

The harddisk which I will be partition and format.

I chose New, then chose Primary, then chose bootable, an asterix will appear under Boot, looks like this.

Lastly, I chose write so that all above will be written to the hard disk.

You need to type in the full word “yes” or “no”. this is to ensure you have actually thought about the set up before writing changes to your hard drive.

“the partition table has been altered” after successful write.

after the changes select quit to exit cfdisk.

Write filesystem and mount the partition to mnt.

lsblk shows the partition of the hard disk, in my lab I only have created sda1 which is shown below.

Write the ext4 filesystem to /dev/sda1, before mounting to /mnt.
mkfs.ext4 /dev/sda1

mount /dev/sda1 /mnt

Install Arch packages

Install these packages base, linux, linux-firmware. optionally can install base-devel.
pacstrap /mnt base base-devel linux linux-firmware nano
nano is not a package in base, hence i explicitly install this in order to make changes to the config files easily, I am not good in vi.

Generate fstab

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

Change into new system

This is to change to the actual system installed in the /dev/sda1 from the live cd.
arch-chroot /mnt

In this place the system root password, add user, change locale configuration and also install the grub to boot the linux.

Change time zone

Set a symbolic link (shortcut).
ln -sf /usr/share/zoneinfo/Asia/Singapore /etc/localtime
hwclock --systohc

Select my own locale

nano /etc/locale.gen
I will be uncommenting en_SG.UTF-8 UTF-8

then run locale-gen

Create the locale.conf, and use US English en_US.UTF-8.
nano /etc/locale.conf
add this LANG=en_US.UTF-8

Hostname and hosts file

echo arch2 > /etc/hostname

Add in the hostname resolution in the hosts file.
nano /etc/hosts localhost
::1 localhost arch2.localdomain arch2


Install grub and generate the grub config
this is the bootloader, grub…
Install grub: pacman -S grub

Install the grub to the hard disk /dev/sda. I am using legacy mode and not UEFI which makes installing grub really straight forward.
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
This grub is installed to the actual system not to the live cd which is why arch-chroot is required to do this.

Install network manager

This step is important, I forgot to do it on the first attempt, this is to ensure the eth has the ip address information else once the actual system is booted the pc is isolated.
pacman -S networkmanager
systemctl enable NetworkManager, starts the network manager on boot. This package is well maintain, and is kind of an alternative to the good old net-tools which you can use the good old ifconfig, with this package to check default route you need to do ip route, ip address to show all devices’ ip address, to check layer 2 information of all devices do this ip link, to show specific ip address of an interface do this ip addr show enp0s3 where enp0s3 is the device name.

Install virtualbox guest utils

Install virtualbox guest additions for this arch virtual machine.
pacman -S virtualbox-guest-utils
I am using the default, that dkms option.

Install XFCE and lxdm

The lxdm is the display manager of the LXDE, i am using it to splash the login, the XFCE is the actual desktop which I will use.
pacman -S xfce4 xfce4-goodies lxdm firefox clamav clamtk
Use the default for all xfce4.

After all installed, I need to turn on the lxdm service on startup before i exit the arch-chroot and reboot.
systemctl enable lxdm

Just a small note… the xfce4-goodies also has python3.8.0 which is the latest.. Why it concerns me? because i am infatuated with python.

The last things to do is the exit from arch-chroot, unmount the /dev/sda and reboot.
umount /mnt

Installed system

One thing I forgot to do… is to create a user…
Anyway I login as root to the xfce and do it.

Below is the lxdm.

This is the xfce desktop.

Create user and add to wheel

Install sudo: pacman -S sudo.
create user: useradd -m cyruslab, the -m switch will create cyruslab’s home directory.
add user to group wheel: usermod -aG wheel cyruslab.
set user’s password: passwd cyruslab

Ensure user is in wheel, two ways:
id cyruslab or
cat /etc/group |grep wheel

change the sudoers file nano /etc/sudoers, uncomment the wheel.

About show ip address

There is no the good old ifconfig, if you need to check your ip address do this ip address show or ip addr, to show specific interface name, for mine is enp0s3 i will do this ip addr show enp0s3. net-tools has deprecated notice, so there will be no updates to net-tools.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s