Arch Linux should run on any i686 or x86_64 compatible machine with a minimum of 256 MB RAM, or 512 MB for x86_64. A basic installation with all packages from the base group should take less than 800 MB of disk space. As the installation process needs to retrieve packages from a remote repository, a working internet connection is required.
Note : All commands will look like this:
some_command portion is supposed to be typed after the prompt which is usually:
root@archiso ~ #
Set the keyboard layout
See Archwiki installation page if you really need this, i.e., your keyboard is not working as expected.
Verify the boot mode
If UEFI mode is enabled on an UEFI motherboard, Archiso will boot Arch Linux accordingly via systemd-boot. To verify this, list the efivars directory:
# ls /sys/firmware/efi/efivars
Connect to the Internet
For wired connection with DHCP (for example - academic area), just connecting a LAN cord to your ethernet port should start the connection. You can verify connection on iitk network with the following command:
# ping 172.31.1.1
For networks requiring static ip (such as your rooms), first stop
dhcpcd service with
systemctl stop dhcpcd@<TAB> (Here
<TAB> refers to pressing the TAB key on the keyboard)
and then see: ArchWiki Network Configuration
For wireless connections, use:
to connect to available networks. You can check connection using the previous command.
Update the system clock
Use timedatectl(1) to ensure the system clock is accurate:
# timedatectl set-ntp true
To check the service status, use
Partition the disks
You might have already partitioned your disks from windows if you have seen the parent guide of this post. So, you will have 3 partitions:
- One partition for the root directory / - approx 50-100gb.
- A swap partition of approximately your RAM size.
Format the partitions
Once the partitions have been created, each must be formatted with an appropriate file system. For a list of partitions use:
# lsblk -o name,size,type,mountpoint,fstype NAME SIZE TYPE MOUNTPOINT FSTYPE sda 931.5G disk ├─sda1 260M part vfat ├─sda2 16M part ├─sda3 416.2G part ntfs ├─sda4 808M part ntfs ├─sda5 12G part swap ├─sda6 10G part ext4 ├─sda7 50G part ext4 ├─sda8 308.5G part ext4 ├─sda9 68.4G part ext4 ├─sda10 50G part ext4 ├─sda11 694M part ntfs └─sda12 13.6G part ntfs
Now, in the example above, my main harddisk is
/dev/sda, yours can be anything. From now
on, I will refer to it as
x = variable corresponding to your harddisk).
Now find the partitions you created. They will probably be the ones with the highest index (it's still your job to verify that).
To format the main root partition (the 50-100 gb one), use:
# mkfs.ext4 /dev/sdxy
y is the number of the partition from the output of
To format the swap partition (the partition with the same size as your RAM), use:
# mkswap /dev/sdxy
x is the number of the root partition from the output of
Mount the file systems
Mount the root partition to
/mnt, for example:
# mount /dev/sdxy /mnt
Find out if your computer uses UEFI or not. The best way (I know) is to verify
whether you have a
vfat partition (as in my case
If yes, then:
# mkdir /mnt/boot # mount /dev/sdxy
/dev/sdxy is the
Also remember this info(whether you have a UEFI system or not) for one of the future steps.
Mount the swap partition:
# mkswap /dev/sdxy
Select the mirrors
Packages to be installed must be downloaded from mirror servers, which
are defined in
/etc/pacman.d/mirrorlist. Since we are in iitk, we will
use the iitk mirrors. For that, use
# nano /etc/pacman.d/mirrorlist
And insert this line at the very top just below the initial comments:
Server = http://mirror.cse.iitk.ac.in/archlinux/$repo/os/$arch
Install the base packages
Use the pacstrap script to install the base package group and other useful stuff:
# pacstrap /mnt base wifi-menu dialog iw wpa_supplicant sudo
Configure the system
Generate an fstab file:
# genfstab -U /mnt >> /mnt/etc/fstab
Change root into the new system:
# arch-chroot /mnt
Set the time zone (probably
Asia/Kolkata, since you live in India):
# ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
Run hwclock(8) to generate
# hwclock --systohc --localtime
# nano /etc/locale.gen
Go to the line and remove the first
Generate localisations with:
nano and add the following line:
/etc/hostname file. A hostname is a name for your pc (You can set that to anything consisting of only letters):
You will need to add a matching entry to
/etc/hosts (the last line):
127.0.0.1 localhost.localdomain localhost ::1 localhost.localdomain localhost 127.0.1.1 myhostname.localdomain myhostname
Set the root password:
If you have an Intel CPU, install the intel-ucode package
# pacman -S intel-ucode
Now, you need to remember if you have a UEFI system or not.
# pacman -S grub os-prober ntfs-3g # grub-install --target=i386-pc /dev/sdx # grub-mkconfig -o /boot/grub/grub.cfg
x with the character of your harddisk.
# pacman -S grub os-prober efibootmgr ntfs-3g # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub # grub-mkconfig -o /boot/grub/grub.cfg
The above steps may sometimes fail to recognize windows. Don't panic, see the reboot section.
Now, its time to create a new user:
# useradd -m -G wheel -s /bin/bash archie
Here, a new user was added with the username
archie and default shell
Just changing the username should suffice for most people.
To change the user's password:
# passwd the_username_you_just_set
sudo by typing
visudo. This opens up the sudo configuration file in
<Shift> + g to goto the end of the file. Now go up, till you see this line:
## Uncomment to allow members of group wheel to execute any command # %wheel ALL=(ALL) ALL
Now, carefully place your cursor on the
# just before
%wheel and press
This will remove the
#. It will now look like this:
## Uncomment to allow members of group wheel to execute any command %wheel ALL=(ALL) ALL
:wq to save and exit.
This should give your user sudo rights.
Exit the chroot environment by typing exit or pressing
Optionally manually unmount all the partitions with
umount -R /mnt:
Finally, restart the machine by typing
reboot. Now while booting choose
grub as the default boot option.
After booting, you will encounter a black screen with option to login. You can now log in with your user.
Post Reboot GRUB Fix
If your Windows did not show up during boot, run this command and check if windows shows up on a reboot:
# grub-mkconfig -o /boot/grub/grub.cfg
See General Recommendations for system management directions and post-installation tutorials (like setting up a graphical user interface, sound or a touchpad).
For a list of applications that may be of interest, see List of applications.