If you’re a relatively new developer, you may have used or heard of Ubuntu, Debian, or Fedora. You probably use MacOS in school or at work. All of these are Unix-like systems that include a lot of tools/software that the maintainers thought would be useful for the user. Not really a bad thing, right?
What if you prefer to build your environment from ground up, as opposed to having everything installed for you?
Are you comfortable with reading instructions, not afraid to use / learn command line tools, and would like to customize everything to your specifications?
If so, then I invite you to try out Arch Linux. I recommend that you try out Arch first on a Virtual Machine. That way you won’t have to worry about setting time, configuring WIFI, etc.
If you’re a Windows, Linux, or Mac user, you should be able to follow this guide regardless of what operating system (OS) you’re on.
For this guide I’ll assume that the reader (you) just want to install Arch with as less explanations possible, and as quickly as possible. I will assume that you’re almost a complete beginner and at least know how to use the Terminal.
For this guide, we’ll use a free virtualizer called VirtualBox (VB). It’s available for Windows, Linux, and Mac. You can just download the latest version. Installing VirtualBox should be fairly straightforward.
As for Arch, you can just grab the
archlinux-yyyy.mm.dd.iso file from the UC Berkeley mirror. If that doesn’t work, get Arch from one of the mirrors here. Just save the image file in a directory of your choice.
In this screenshot,
archlinux-yyyy.mm.dd.iso refers to
yyyy corresponds to year,
mm to month,
dd to date.
Installing Arch in a VirtualBox VM
Create new Virtual Machine (VM)
- Open Virtual Box, then hit
- Create a name for your VM. For this guide, let’s use
Arch Test. Be sure to select
Linuxunder Type, and
Arch Linux (64-bit)under Version.
- Leave the defaults for everything. Hit
Continueon each dialog box.
Finally, your new VM should be on the list pane on the left. We are now ready to install Arch Linux!
Install Arch Linux
Note: You can also use the official installation guide. This guide merely covers installing on a VM and simplifies some steps.
- Right click on
Arch Test. Select
Settings. Go to
- Click on the disc icon on the right, then select the Arch Linux image you downloaded earlier. If there is nothing, click
Choose Virtual Optic Disk Fileand then navigate to where you downloaded the Arch Linux image. Select this image. Hit
- With your VM selected, hit the
Startbutton on the main VirtualBox screen.
- Your VM should display. Close any pop up window that may appear. Select
Boot Arch Linux (x86_64)and press
Enter. Arch should do some housekeeping for a few moments.
- Once your Arch VM displays the following, then you are ready to actually, actually get started!
Arch Linux 4.8.11-1-ARCH (ttyl1) archiso login: root (automatic login) root@archiso ~ #
Now, I won’t bother too much as to what these commands do. Be sure to do these in order.
- Partion Disks with
- Format Partitions with
- Mount filesystems with
mount /dev/sda /mnt.
- Install base packages with
pacstrap /mnt base.
- Generate fstab with
genfstab -U /mnt >> /mnt/etc/fstab.
- Change root into the new system with
- Set timezone to Los Angeles with
ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime.
en_US.UTF-8 UTF-8locale with
sed '/en_US.UTF-8 UTF-8/s/^#//' /etc/locale.gen. This looks for the line with
#en_US.UTF-8 UTF-8, and deletes the
#. Afterwards, run
- Set the
echo "LANG=en_US.UTF-8" > /etc/locale.conf
- Set the hostname to
echo "arch" > /etc/hostname.
- Add a matching hostname entry to
echo "127.0.1.1 arch.localdomain arch" >> /etc/hosts.
- Create a new
mkinitcpio -p linux.
- Set password with
echo "root" | chpasswd.
- Install and configure bootloader with:
pacman -S grub --noconfirm grub-install --force --target=i386-pc /dev/sda grub-mkconfig -o /boot/grub/grub.cfg
- Done! Type
umount -R /mnt. Shutdown your VM by typing
If you’re lazy and impatient, use my install script for this guide:
curl -L https://raw.githubusercontent.com/nbau21/dotfiles/master/install_script.sh > install_script.sh
install_script.sh will run all the commands I wrote above. The root password for this installation is
Running Arch for the First Time
Congrats! If you used my script or used the commands above, you should now have Arch installed on your VM. You just have to eject the Arch Linux
archlinux-yyyy.mm.dd.iso image file from earlier.
- On the VirtualBox window, right click on
Arch Test. Select
Settings. Go to
Storage. Click the disc icon on the right again, then select
Remove Disk From Virtual Drive.
- Start the
Arch TestVM again, and now you are running Arch on a VM! You should see the following prompt:
Arch Linux 4.8.11-1-ARCH (ttyl1) arch login:
- Type in
rootand then the password you set earlier. Now, you should see the new prompt below. You are now logged in as
[root@arch ~] #
Welcome to your new, pure Arch Linux VM.
With your new Arch VM set up, you should adding functionalities listed in the General Recommendations section of the Arch Wiki. I recommend the following in order:
- Create new users and groups, as the only account in your installation is the superuser known as
- Update and upgrade your Arch installation with
sudo pacman -Syu.
- Install a desktop environment or window manager.
I’ve been playing around with various Arch Linux installations to try out different desktop environments before breaking my desktop. You can check out screenshots of my current setup here! There’s always something to learn and experiment with. Let me know what you’ve been up to with your Arch VM!