Chroot into the system

Switch into the root with a new system:

arch-chroot /mnt

Locale

Uncomment needed locales e.g. en_US.UTF-8 UTF-8:

vim /etc/locale.gen

And generate them:

locale-gen

Also add LANG variable:

cat > /etc/locale.conf
echo "LANG=en_US.UTF-8" > /etc/locale.conf

Example to make dvorak layout persistent:

cat > /etc/vconsole.conf
echo "KEYMAP=dvorak" > /etc/vconsole.conf

Network configuration

Hostname - is a unique name created to identify a machine on a network.

  • Basic method that working in arch-chroot.: Replace uniquename with anything you want:
echo uniquename > /etc/hostname

TIP

Later you will see something like user@uniquename

  • You will be able to generate hostname with hostnamectl later. This method is not working in arch-chroot.
hostnamectl set-hostname myhostname

Add matching entries to the hosts, edit vim /etc/hosts.

127.0.0.1     localhost
::1           localhost
127.0.1.1     uniquename.localdomain uniquename

If the system has a permanent IP address, it should be used instead of 127.0.1.1
See more in network configuration.

Community repositories

Enabling multilib for the arch community repositories.

NOTE

multilib is for 64bit system.

To do this open the pacman.conf file:

vim /etc/pacman.conf

Uncomment this:

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

TIP

You also may add unofficial repositories with caution.

  • To have pacman animation add this under the 'Misc options':
ILoveCandy
  • You will need Color option for yay later.

And update the system. We should let system know about the changes.

pacman -Syyu

User and password

  • Root password:
passwd
  • User password:
    You should add at least one user. Replace username with preferred one:
useradd -m -g users -G wheel,storage,power -s /bin/bash username

And set password for a new user:

passwd username

Sudoers

WARNING

Read about visudo before editing! Any errors makes sudo unusable.
Always edit /etc/sudoers file with visudo to prevent errors.

EDITOR=vim visudo

Since you added user to the wheel group, user will gain full root privileges, you need to uncomment this line:

%wheel ALL=(ALL) ALL

NOTE

If you are using a server or someone else has access to the wheel group, you may want to require sudoers to type root password.
In this case add this line:

Defaults rootpw

Read more about root password.

Microcode

You should enable microcode updates, my laptop has intel CPU:

pacman -S intel-ucode

TIP

Install amd-ucode if you have AMD CPU.

Last Updated: 12/30/2018, 10:56:45 PM