First of all, welcome to be an Archer :)
Then, let's start.
Download the .iso file from the following link:
https://archlinux.org/download/
The installation image can be supplied to the target machine via a USB flash drive, an optical disc or a network with PXE.
You can use "Rufus" to make a live environment into your removeable USB drive.
I suggest you to use Ventoy to create bootable USB drive.
Ventoy is an open source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files.
With ventoy, you don't need to format the disk over and over, you just need to copy the ISO/WIM/IMG/VHD(x)/EFI files to the USB drive and boot them directly.
Then, enter the UEFI BIOS, disable Secure Boot, and then boot the installation medium.
Ensure your network interface is listed and enabled
For ethernet, just plug in the cable.
For Wi-Fi, authenticate to the wireless network using iwctl
For USB tethering, connect your phone to computer via USB cable, and turn on USB tethering.
The iwd package is pre-installed in the installation medium, feel free to use it.
To get an interactive prompt, type the following command into your zsh shell.
First, if you do not know your wireless device name, list all Wi-Fi devices:
Then, to scan for networks:
You can then list all available networks:
Finally, to connect to a network:
To exit the interactive prompt, send EOF by pressing Ctrl+d or enter "exit".
The connection may be verified with ping:
Use timedatectl
to ensure the system clock is accurate:
To check the service status, use:
You can also create swapfile shown below.
When recognized by the live system, disks are assigned to a block device such as /dev/sda, /dev/nvme0n1 or /dev/mmcblk0. To identify these devices, use lsblk or fdisk.
Once you've checked the block device. Use cfdisk
to modify partition table
Mount point | Partition | Partition type | Suggested size |
---|---|---|---|
/mnt/boot/efi | /dev/efi_system_partition | EFI system partition | At least 300MiB |
[SWAP] | /dev/swap_partition | Linux swap | More than 512 MiB |
/mnt | /dev/root_partition | Linux x86-64 root (/) | Remainder of the device |
Mount the root volume to /mnt. For example, if the root volume is /dev/root_partition:
If you created a swap volume, enable it with swapon:
If you feel the download speed is too slow, you can modify /etc/pacman.conf
, uncommand the following commands. Note that now you are modifying the configuration in boot image. This is just a temporary modification.
Use the pacstrap script to install the base package, Linux kernel and firmware for common hardware:
and some important apps:
We recommand you to install the following tools.
If pacstrap return like this
error: <package>: signature from "<maintainer>" is unknown trust
This means your keyring on the ISO is obsolete, you need to upgrade your installation medium.
Or you can run this command in arch live environment
Then you can install by pacstrap normally.
The iwctl is pre-installed in installation
medium, but not in the device, you can install it by pacstrap or by pacman -S after chroot to /mnt. Thus, you must install NetworkManager during installation step in installation medium
pacman is the package manager of Arch Linux
You can use swapfile to create swap. In this case, you can easily configure the swap space at anytime.
fallocate
directly manipulates the allocated disk space for the file.Link: Back to Partition the Disks (With Swap Space)
Mount the EFI partition to /boot/efi
Generate an fstab file (use -U or -L to define by UUID or labels, respectively):
Check the resulting /mnt/etc/fstab
file, and edit it in case of errors.
Change root into the new system:
In chroot mode, systemctl can only enable or disable apps, it can't start or stop during chroot mode.
Set the time zone:
Let's say you are in Taiwan, enter the following command:
If you're struggling with showing different times when Windows and Linux dual booting, you can adjust the Linux timezone RTC to local timezone, which is same as Windows does.
Then, update your time from NTP server.
Run hwclock
to generate ``/etc/adjtime`:
This command assumes the hardware clock is set to UTC. See System time#Time standard for details.
Uncommit en_US.UTF-8 UTF-8
and others language you need in /etc/locale.gen
. Generate the locales by executing:
Create the locale.conf file, and set the LANG variable accordingly:
Create the hostname file:
Add matching entries to hosts:
If the system has a permanent IP address, it should be used instead of 127.0.1.1.
Creating a new initramfs is usually not required, because mkinitcpio was run on installation of the kernel package with pacstrap.
Set the root password:
Add new user by the following command:
Edit visudo
, add/uncommend the following script:
Set password for the user
Make a directory for the user
Add the user into group
Choose and install a Linux-capable boot loader. If you have an Intel or AMD CPU, enable microcode updates in addition.
Depending on the processor, install the following package:
amd-ucode
for AMD processors,
intel-ucode
for Intel processors.
Here we demonstrate GRUB for you.
In our case, we split the disk into EFI, swap, and main file system.
If you have another OS in your computer, just mount them into everywhere you wish. Let's say /mnt/Ubuntu.EFI
, /mnt/Windows
The EFI of Windows is located in C:\Windows\Boot\EFI
.
To have grub-mkconfig
search for other installed systems and automatically add them to the menu, install the os-prober
package and mount the partitions from which the other systems boot.
GRUB (GRand Unified Bootloader) is a multi-boot loader. It is derived from PUPA which was a research project to develop the replacement of what is now known as GRUB Legacy. The latter had become too difficult to maintain and GRUB was rewritten from scratch with the aim to provide modularity and portability.
Follow the below steps to install GRUB:
GRUB
. A directory of that name will be created in esp/EFI/ to store the EFI binary and this is the name that will appear in the UEFI boot menu to identify the GRUB boot entry.grubx64.efi
to esp/EFI/GRUB/
and install its modules to /boot/grub/x86_64-efi/
.In our case, type the following command:
After the above install completed the main GRUB directory is located at /boot/grub/
. Note that grub-install
also tries to create an entry in the firmware boot manager, named ArchLinux
in the above example.
On an installed system, GRUB loads the /boot/grub/grub.cfg
configuration file each boot.
Use the grub-mkconfig tool to generate /boot/grub/grub.cfg
:
If you get the following output: Warning: os-prober will not be executed to detect other bootable partitions
then edit /etc/default/grub
and add/uncomment:
Then re-run grub-mkconfig
If you have problem with the resolution of GRUB theme, you can install this GUI tool to help you changing the resolution with theme.
You can configure pacman.conf first to accelerate download speed.
I recommend KDE desktop environment because it has fewer bugs than gnome and easy to use.
Once installed, enable the Display Manager and Network Manager services:
The Simple Desktop Display Manager (SDDM) is a display manager. It is the recommended display manager for the KDE Plasma and LXQt desktop environments.
You can't start or stop any apps in chroot mode.
Exit the chroot environment by typing exit
or pressing Ctrl+d
.
Optionally manually unmount all the partitions with umount -R /mnt
: this allows noticing any "busy" partitions, and finding the cause with fuser.
Finally, restart the machine by typing reboot
: any partitions still mounted will be automatically unmounted by systemd. Remember to remove the installation medium and then login into the new system with the root account.
After reboot, type the following command:
If you want to access the network first, type nmtui
to configure network access.
Then you can use KDE. Enjoy to be an Archer :)
Yet Another Yogurt - An AUR Helper Written in Go
We also recommand you to install the following program
We also recommand you to install the following AUR program
If you are using ThinkPad X1 Carbon Gen 9, you have to install the following program to use audio card and fingerprint.
According to https://wiki.archlinux.org/title/chromium, we no longer edit /usr/share/applications/google-chrome-stable.desktop
.
Instead, we add chrome-flags.conf
in the directory ~/.config/
.
We pass --password-store=basic
to Chrome to disable KDE wallet.
Add the configuration into /etc/environment
In ibus preference, select the chewing perference, disable 前方加詞, 單純注音模式, 後方選詞
Add the configuration into $HOME/.xprofile
The group fcitx5-im
is very important. It contains
fcitx5
fcitx5-configtool
fcitx5-gtk
fcitx5-qt
For example, you need fcitx5-gtk
to use fcitx5 in Google Chrome.
Add the configuration into /etc/environment
Add the configuration into $HOME/.xprofile
If you notice that shift
does not work properly, just press ctrl+space
. XDD
You may use Google Noto Fonts.
Locales are used by glibc
and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.
Reference:
https://wiki.archlinux.org/title/locale
If you have trouble for waiting long time to shutdown or reboot, modify /etc/systemd/system.conf
and uncomment the following commands:
Edit the file /etc/pacman.conf
, uncommand the following commands.
Edit the file
Add/Uncomment the following command:
https://archlinux.org/mirrorlist/all/
Install the following drivers.
And then reboot your system.
Now for the case of those who are users of Arch Linux, Manjaro Linux, Antergos or any other distro based on Arch Linux. They will be able to install this tool in a simpler way.
This is thanks to GreenWithEnvy it is added within the AUR repositories and all the dirty work of compilation will avoid it.
They just need to have the AUR repository enabled on their system and have an AUR wizard installed. If you don't have one installed you can check the next post where we recommend one.
To install TuxClocker on Arch Linux, We just have to open a terminal and in it we are going to type the following command:
To enable overclocking on the PowerMizer page in nvidia-settings, type the following command:
More information:
https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Overclocking_and_cooling
First, you need to enable multilib. To enable multilib repository, uncomment the [multilib] section in /etc/pacman.conf:
Then upgrade the system and install the desired multilib packages.
The following requirements must be fulfilled in order to run Steam on Arch Linux:
The Linux kernel includes open-source video drivers and support for hardware accelerated framebuffers. However, userland support is required for OpenGL and 2D acceleration in X11.
First, identify the graphics card (the Subsystem output shows the specific model):
Then, install an appropriate driver. You can search the package database for a complete list of open-source video drivers:
Xorg searches for installed drivers automatically:
In order for video acceleration to work, and often to expose all the modes that the GPU can set, a proper video driver is required:
Brand | Type | Driver | OpenGL | OpenGL (multilib) | Documentation |
---|---|---|---|---|---|
AMD / ATI | Open source | xf86-video-amdgpu | mesa | lib32-mesa | AMDGPU |
AMD / ATI | Open source | xf86-video-ati | mesa | lib32-mesa | ATI |
AMD / ATI | Proprietary | xf86-video-amdgpu | amdgpu-pro-libgl (AUR) | lib32-amdgpu-pro-libgl (AUR) | AMDGPU PRO |
Intel | Open source | xf86-video-intel | mesa | lib32-mesa | Intel graphics |
NVIDIA | Open source | xf86-video-nouveau | mesa | lib32-mesa | Nouveau |
NVIDIA | Proprietary | nvidia | nvidia-utils | lib32-nvidia-utils | NVIDIA |
NVIDIA | Proprietary | nvidia-470xx-dkms (AUR) | nvidia-470xx-utils (AUR) | lib32-nvidia-470xx-utils (AUR) | NVIDIA |
NVIDIA | Proprietary | nvidia-390xx (AUR) | nvidia-390xx-utils (AUR) | lib32-nvidia-390xx-utils (AUR) | NVIDIA |
Other video drivers can be found in the xorg-drivers group.
Xorg should run smoothly without closed source drivers, which are typically needed only for advanced features such as fast 3D-accelerated rendering for games. The exceptions to this rule are recent GPUs (especially NVIDIA GPUs) not supported by open source drivers.
When you finish installing steam, goto Steam -> Settings -> Steam Play
Enable Steam Play for all other titles and choose Proton Experimental.
To enable bluetooth service, type the following command:
Go to Setting -> 捷徑 -> Shortcuts, press Add Application, choose Flameshot.
Set Take screenshot to your favorite shortcut.
Install the following app and font:
Copy your theme into /usr/share/sddm/themes/
Edit /usr/lib/sddm/sddm.conf.d/default.conf
In [Theme]
, Set Current=<your theme name>
Save it and reboot your system.
Edit /usr/lib/sddm/sddm.conf.d/default.conf
In [General]
, Set Numlock=on
Save it and reboot your system.
You have to make the configuration of the network card to always enabled wake on lan after every reboot.
[Unit]
Description=Configure Wake On LAN
After=multi-user.target[Service]
Type=oneshot
ExecStart=/usr/bin/ethtool -s <INTERFACE> wol g
ExecStartPre=/bin/sleep 1
Restart=on-failure
RestartSec=1s[Install]
WantedBy=multi-user.target
You can find the <INTERFACE> by ip a
Then type the following command:
If you have any problem, type
If there are multiple devices need to setup, try this:
https://stackoverflow.com/questions/48195340/systemd-with-multiple-execstart
You can check if the magic package is delivered properly to the target machine by typing the following command:
In order to use hibernation, you need to create a swap partition or file. You will need to point the kernel to your swap using the resume=
kernel parameter, which is configured via the boot loader. You will also need to configure the initramfs. This tells the kernel to attempt resuming from the specified swap in early userspace. These three steps are described in detail below.
Edit /etc/default/grub
You can find the UUID by blkid
Then reconfig grub.
Edit /etc/mkinitcpio.conf
, add resume into HOOKS. Whether by label or by UUID, the swap partition is referred to with a udev device node, so the resume hook must go after the udev hook.
Regenerate the initramfs for these changes to take effect.
Using a swap file requires also setting the resume=UUID=swap_device_uuid
and additionally a resume_offset=swap_file_offset
kernel parameters. See the kernel documentation.
swap_device
is the volume where the swap file resides and it follows the same format as for the root parameter.
You can find the UUID of swapfile by
On file systems other than Btrfs, the value of swap_file_offset
can be obtained by running
The output is in a table format and the required value is in the first row of the physical_offset column.
In the example the value of swap_file_offset
is the first 92270592 with the two periods and the kernel parameter would be resume_offset=92270592
.
Finally, regenerate grub configure and mkinitcpio as shown above.
If you want to append your path globally, you can add your path to /etc/profile
Type source /etc/profile
to reload it.
If your timeshift cannot backup your system automatically, type the following command:
https://wiki.archlinux.org/title/TLP
If you have trouble of screenshot or OBS failure, try setting "Never" to "Keep window thumbnails"
And then type the following command:
Or you can just turn it off.
https://forum.manjaro.org/t/blank-icons-in-app-menu/37652/2
If you get blank icon or the icon is broken of the pinned apps in the system tray, you can type the following command:
This will force Plasma to rebuild its icon caches.
https://wiki.archlinux.org/title/PipeWire
Install the pipewire
package from the official repositories. There is also lib32-pipewire
for multilib support.
Pipewire uses systemd/User for management of the server and automatic socket activation.
Optionally, install pipewire-docs
to review the documentation.
Helvum — GTK-based patchbay for PipeWire, inspired by the JACK tool catia. Does not save wire sets.
https://gitlab.freedesktop.org/pipewire/helvum
Install pipewire-pulse
. It will replace pulseaudio
and pulseaudio-bluetooth
. Reboot, re-login or start the pipewire-pulse.service
user unit to see the effect.
Normally, no further action is needed, as the user service pipewire-pulse.socket
should be enabled automatically by the package. To check if the replacement is working, run the following command and see the output:
EasyEffects (former PulseEffects) is a GTK utility which provides a large array of audio effects and filters to individual application output streams and microphone input streams. Notable effects include an input/output equalizer, output loudness equalization and bass enhancement, input de-esser and noise reduction plug-in. See the GitHub page for a full list of effects.
In order to use EasyEffects, install easyeffects
. See Community Presets for a collection of preset configurations. See AutoEq for collection of AI generated EQ presets for headphones.
Finally, install lsp-plugins
, calf
.
Type the following command:
Edit your rc file, e.g. .bashrc
or .zshrc
. Add the following function into it.
After that, reload your run script.
Similarly, you can reboot to Ubuntu or Arch Linux directly.
After that, reload your run script.