This post contains some notes I want to remember when installing Arch Linux.
The official Arch Linux can be downloaded from https://www.archlinux.org/download/. If you are new to Arch Linux, it is better to install Manjaro Linux or Anarchy-Linux. The installation guide can be found at https://wiki.archlinux.org/index.php/installation_guide. Here, I describe how I install Arch Linux to my ASUS X44H laptop.
I download the latest ISO from https://www.archlinux.org/download/ and create a live USB with that iso file.
In a Linux system, you can use the
I have the default console keymap (i.e., US), so I do not need to re-configure the keyboard layout. To list all available layouts, use
To set a layout, use
To verify if your computer supports UEFI, use
If you connect to the internet using wired network devices (as I do) then you can verify the connection (which is enabled on boot by the installation image) using
See this page for more details on how to configure a network connection.
Use the command
to ensure the system clock is accurate.
fdisk -l lists all available storage devices and its partitions.
Suppose that I install the system in
To create/delete/re-size a partition in a storage device, I use cfdisk (DOS partition tables).
I created three partitions for
/home, and swap.
It is recommended that if you have less than 1GB RAM then you should spend 1GB for swap, if you have 2-4GB RAM then you should spend half of the size of RAM for swap, and otherwise you should spend 2GB for swap.
To format a partition, use the command
mkfs.filsystem_type /dev/sdax, here
filesystem_type can be
jfs, etc., and
/dev/sdax is the partiton number.
You should also format and enable the swap partition with the
/mnt/homefor mounting the home partition (mount point
/mnt/windowsdirectory for mounting the partition.
I also want to use
wifi-menu in my newly installed system, so I also use:
fstab file defines how disk partitions, block devices or remote file systems are mounted into the filesystem.
-U indicates defining by UUID.
To define by labels, use option
For Vietnamese, the Region is
Asia, and the City is
en_US.UTF-8 UTF-8 and other needed localizations in
/etc/locale.gen, and generate them with:
LANG variable in
/etc/locale.conf accordingly, for example
and matching entries to
/etc/mkinitcpio.conf by changing
and recreate the initramfs image with
To change root password, use
To create a new user, use
See this page for more details.
My ASUS laptop has Intel(R) Pentium(R) CPU B950 @ 2.10GHz (use
cat /proc/cpuinfo to show CPU info), so I need to first install
intel-ucode package using
I also have Windows partition, so I need
I also edit
/etc/default/grub by changing
Now, I can run the grub installation using
and finally generate the grub configuration file
Exit the chroot environment by typing
exit or press Ctrl+D.
Unmount all the partitions with
umount -R /mnt.
reboot to restart the system.
Remove the installation media and then login into the new system with the root account.
To avoid time display error between Arch Linux and Windows, use
In Arch Linux, users can add and install their favorite packages from AUR, aka Arch User Repository via the pacman package manager.
Since AUR contains about 44,000 packages, for most of them, one need to manually download, check, and install.
This is where packer or yaourt come in handy.
Here is how I install
(The original guide is here).
If you need a GUI, install pamac-aur.
Update (2018-11-14): Both
yaourt are outdated and discontinued. Use yay (yet another yogurt) instead.
To enable GDM (GNOME Display Manager), use
eclipse-cpp are in conflict, to use C/C++ Development Tools, I install CDT 9.5.5 for Eclipse Photon and 2018-09 in
eclipse-java by choosing
Help > Install New Software..., add the CDT repository http://download.eclipse.org/tools/cdt/releases/9.5, and install the
CDT Main Features and
CDT Optional Features.
Download from http://www.freeoffice.com/en/download.
You need to register to get a product key (free of charge).
Let say you download
softmaker-freeoffice-2018-931-amd64.tgz, then the installation steps are
If you want to uninstall FreeOffice 2018, you can just simply run
For more information, see this page.
mkinitcpio -p linux, if you get the warning
then simply install the
aic94xx-firmware packages using
yaourt and run
mkinitcpio -p linux again.
Install the downgrade package using
This package helps you install some previous version of a current package, which is very useful in case of conflicted dependencies.
If you want a specific version of a package, say
netpbm-10.73-1-x86_64.pkg.tar.xz (a dependency for
latex2html), you can go to https://archive.archlinux.org/packages/ to look for the package at https://archive.archlinux.org/packages/n/netpbm and install using
There is no trouble installing Vanilla TeXLive, but I want to add some note: Install texlive-dummy via
yaourt in order to tell
pacman that you’ve already installed TeXLive.
You can also install TeXLive using
If you use
perl >= 5.26.0, you need a workaround: add
PERL5LIB=$PERL5LIB:.; export PERL5LIB to
The reason is that LaTeX2HTML uses module
cfgcache.pm from the installation directory, but since version
perl no longer includes the current directory in
@INC path (see this page).
To compile and install pdf2htmlEX, I use
20141126-3, together with the pdf2htmlex-git package.
One can also install
poppler from source
fontforge from the GitHub repository https://github.com/coolwanglu/fontforge
Then, edit the newly created file
configure by finding the lines (~ line 18431)
and replace the first
for am_cv_pathless_PYTHON in python python2 python3 with
If you get the error
and you have
readline >= 7.0.005-1 and
zeromq >= 4.2.2-2 then create symbolic links
When I installed tor-browser (via
yaourt), the following error occurred
To fix this, simply import the missing PGP key, as follows.
I often use IPE for drawing graphs in my papers. To install IPE in Arch Linux, you can just simply use
yaourt -S --needed --noconfirm ipe (assuming you’ve already installed
yaourt). Several useful tools (
svgtoipe) for IPE can be found in the
ipe-tools-git package. I also use the ipelet ipe2tikz to export IPE pictures to TikZ code. One thing you may want to remember when using the generated TikZ pictures is how to scale your TikZ picture to fit the paper size. Several other useful ipelets are also available. Finally, for convenience, I also create the file
/usr/share/applications/ipe.desktop and make it executable.
If you get the error
One can also install the latest
pass-import from its GitHub repository as follows
See this page for a guide on how to use
A non-exhaustive list of packages I installed (using
Keeping a list of installed packages is useful when you want to speed up installation on a new system or backup a working system. The command
generates a list of installed packages (including packages from AUR). The command
JAIST provides two wireless network services with SSIDs
The instruction is for Windows, MacOS X, and Android.
I figure that it can also be used for Arch Linux (and maybe some other Linux distribution).
Basically, the wifi security information for accessing these wifi SSIDs (I use NetworkManager for managing network connection) is as follows.
Security type : WPA & WPA2 Enterprise
Authentication : TLS
Identity : [Your JAIST account]@jaist.ac.jp (for students, sXXXXXXX@jaist.ac.jp)
Domain : [Leave it empty]
CA certificate : Use the file
/etc/ssl/ca-certificates.crt (make sure that the package ca-certificates-utils is installed)
User certificate : Use the digital certificate provided from JAIST
User private key : Use the digital certificate provided from JAIST
User key password : [Your password for reading the provided digital certificate]
Note: Put your digital certificate in some place where the path to it contains no file/folder whose name containing blank space.
JAIST also provides an SSL-VPN gateway system.
In Arch Linux, I download
F5 Linux CLI (command line interface) Edge Client Installer
linuxsslvpn.gz) and install as follows.
To use JAIST SSL-VPN, from the Terminal, you can use the command
You will have to input your password for reading your digital certificate (provided from JAIST), your username (for student, sXXXXXXX), and the password of your JAIST’s account.
After you successfully start the connection, you can use
f5fpc --info to check the connection status.
At the time of writing this post, JAIST provides two VPN networks
/Common/jaist-vpn2-na (as shown when using
vpn1 only passes accesses to JAIST through VPN, while
vpn2 passes all accesses through VPN.
To use, say
vpn2, you can use the command
To stop using JAIST SSL-VPN, use the command
To fix this, use the command
After installing VS Code (
visual-studio-code-bin), anything opened using the “Places” extension in GNOME opens VS Code instead of the default folder/path (as described here). To resolve this issue, I simply add the lines
~/.config/mimeapps.list (or just the second line if
[Default Applications] already exists).
The original instruction is available here.
sudo systemctl enable bluetooth.service.
bluetoothctl, it will open a new console. In that console, type
trust XX:XX:XX:XX:XX:XXfor each paired device (replace
XX...with mac address).
Recently, I’ve bought a HP X4000b Bluetooth Mouse and having trouble when I have to re-pair the device again and again every time I switch between Arch Linux and Windows 10. Luckily, I found this instruction. I describe the steps here.
sudo pacman -S --needed --noconfirm chntpw.
chntpw -e SYSTEMopens up a console. Run the following commands in that console.
cdto your bluetooth config location
/var/lib/bluetooth/[bth port mac addresses)].
info. In these files, you’ll see the link key you need to replace with your windows ones like so.
Once updated, restart the bluetooth service
sudo systemctl restart bluetooth.
Note: If you Pair all Bluetooth devices with Windows 10 first, and then with Arch Linux, then the key for all systems should be the key of the last system the devices were paired, which is Arch Linux in this case.
If you get the error
gnupg1 then you can import the missing keys with the command
Let say you want to remove the passphrase of a secret key named
passwd in the
gpg> command prompt, enter the old passhrase of the imported PGP key, and press Enter for the new passhrase. Answer
y when you were asked
You don't want a passphrase - this is probably a *bad* idea! Do you really want to do this? (y/N). Finally, type
save to save the result and exit the command prompt.