AI Translation
Original Chinese
In the previous tutorial Archlinux Install Guide, I explained how to install an encrypted system.
However, I did not cover what to do next. In this tutorial, I will explain how to handle the remaining steps.
Note: The current state is immediately after completing the previous tutorial, with no further operations performed.
Systemd-homed
Systemd-homed is a home directory manager (referred to as homed hereafter) that provides system-independent portability. However, we are not using it for its portability but primarily for its security.
homed enables the use of additional Although we have encrypted the entire root directory with LUKS, that is only static encryption. Remember? Once we log into the system, the directory is decrypted. Other users or administrators could access our home directory through authorized or unauthorized means. Therefore, additional encryption can prevent unauthorized access. Password-protecting the home directory is different from the login password. The login password can be changed by the root user, while homed can be encrypted using LUKS, and the root user cannot access the information in your home directory without knowing the password.
Installation
homed is already part of systemd, so no installation is required. Simply start it.
Start
We only need to start the service by executing the following command.
systemctl enable --now systemd-homed.serviceAfter entering the command, you can check the startup status.
systemctl status systemd-homed.serviceYou should see output similar to the following. Pay attention to the enabled status in the Loaded: line, which confirms that it is set to start automatically at boot.
lyle@arch ~> systemctl status systemd-homed.service
● systemd-homed.service - Home Area Manager
Loaded: loaded (/usr/lib/systemd/system/systemd-homed.service; enabled; preset: enabled)
Drop-In: /usr/lib/systemd/system/systemd-homed.service.d
└─10-nvidia-no-freeze-session.conf
Active: active (running) since Tue 2025-06-17 16:03:23 CST; 45min ago
Invocation: ********************************
Docs: man:systemd-homed.service(8)
man:org.freedesktop.home1(5)
Main PID: 779 (systemd-homed)
Status: “Processing requests...”
Tasks: 1 (limit: 37404)
Memory: 15.8M (peak: 78M)
CPU: 1.219s
CGroup: /system.slice/systemd-homed.service
└─779 /usr/lib/systemd/systemd-homedCreate a new user
Please note that we are currently using the root user. If you want to convert the original user to an account managed by homed, you need to refer to the Wiki for instructions. This tutorial chooses to directly create a new user and manually migrate the data.
We directly use the command to create a new user with the following command.
homectl create <USERNAME> --disk-size <SIZE>Note that you need to replace <USERNAME> with the desired username and <SIZE> with the desired spaceNote that if you do not manually set --disk-size, a large amount of space will be automatically assigned to the user, possibly up to 80% of the available space size. For example:
root@arch ~> homectl create test_user --disk-size 1G
Password suggestions: Eroc#ArwAnyx,o $YwEk-owoPfOj[ [ozYKRIxfad=aJ =ecxuzAGeSGonw ubyzv3k0fUsxUv YGahaj#Aq24KAf
🔐 Please enter new password for user test_user:
🔐 Please enter new password for user test_user (repeat): Note that the password must be at least eight characters long.
Viewing the account
After creating the user, you can use the following command to view the account.
homectl inspect test_userYou will see the following information.
Here you can view your basic account information. If there is anything to note, it is the Disk Size, ensuring it matches the size you set.
Logging In
Simply log in as usual.
Granting Permissions
Before proceeding to the next step, you need to grant permissions to your account.
Execute the following command: echo “<USERNAME> ALL=(ALL:ALL) ALL” >> /mnt/etc/sudoers.d/<USERNAME>.
Note that you need to replace <USERNAME> with your actual username.
This will grant your account permission to use sudo for privilege escalation.
Disable the root account
Once you can log in to your account normally, the first thing you should do is disable the root account. You should not use the root account as your primary account, as this greatly increases the risk of security breaches!
Use the command: sudo usermod -s /usr/bin/nologin root to disable the root account. This will prevent any form of login to the root account.
If you wish to disable this restriction, you can execute: sudo usermod -s /bin/bash root.
All subsequent operations will be performed on the new user.
Installing NVIDIA Graphics Card Drivers
If your computer has a graphics card and it is an NVIDIA card, you may need to perform this step.
Installation
You only need to install nvidia-open. Currently, nvidia-open is well-maintained and works well.
sudo pacman -S nvidia-openInstall Gnome
Personally, I prefer Gnome because of its out-of-the-box usability and dynamic workspaces, even though I used KDE before 🤦♂️.
Installation
The installation process is fairly straightforward; simply enter the following command:
sudo pacman -S gnomeStarting Gnome
Gnome starts via GDM and can be launched with the following command:
sudo systemctl start gdm.serviceThis will start the desktop via Systemd. Once you confirm it starts correctly, you can use the following command to enable it to start automatically at boot.
sudo systemctl enable gdm.serviceConfiguring ZRAM
Remember that we did not set up a swap partition when installing the system earlier. Now we will configure ZRAM, which is similar to a virtual swap partition.
Installation
We use the following command to install zram-generator
sudo pacman -S zram-generatorAfter installation, we also need to set the configuration file as follows:
[zram0]
zram-size = min(ram / 2, 4096)
compression-algorithm = zstd/etc/systemd/zram-generator.confThis will create a virtual swap partition with a maximum size of 4GB and a minimum size of half your current memory. For example, if your memory is 4GB, the partition size will be 2GB; if your memory is 16GB, the partition size will be 4GB.
For more details, refer to zram-generator config
Start
Since you have adjusted the systemd configuration, you need to use sudo systemctl daemon-reload to reload the configuration.
Use the command sudo systemctl enable -now systemd-zram-setup@zram0.service to start the service.
After starting, you can see the [SWAP] virtual partition using the lsblk command.
lyle@arch ~> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 512G 0 loop
└─home-lyle 253:2 0 512G 0 crypt /home/lyle
zram0 252:0 0 4G 0 disk [SWAP]
nvme1n1 259:0 0 476.9G 0 disk
├─nvme1n1p1 259:1 0 511M 0 part /efi
└─nvme1n1p2 259:2 0 476.4G 0 part
└─linuxroot 253:0 0 476.4G 0 crypt /Timeshift
In the previous tutorial, we mentioned using Timeshift to back up the system, but that part was not covered in the previous article.
Installation
Since our installation process configures Btrfs to meet Timeshift’s requirements, the configuration process is exceptionally simple.
Install Timeshift using sudo pacman -S timeshift.
Enable Scheduled Tasks
Timeshift requires scheduled tasks to handle daily backups, monthly backups, and other tasks.
Use the command sudo systemctl enable --now cron.service to start the scheduled service.
Configure Timeshift
Since the desktop environment is already installed, you can simply launch Timeshift and follow the configuration process. Basically, just click “Next” without thinking.
Install Git
Mainly needed for later use, execute the command: sudo pacman -S git
Install Paru
Paru is an AUR helper program written in Rust, similar to yay.
Execute the command
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -siIts usage is similar to Pacman, such as paru -S, paru -Rs, for installation, uninstallation, etc.
danger
Never use sudo to start paru!
Installing 1Password
Most of my passwords are managed by 1Password, so it must be installed.
Follow the instructions in the 1Password documentation.
Rog Controller
If you are using a Rog computer, you can install a controller to manage your computer, including power management, fan management, and other features.
You can visit Rog Linux for more information.
Enabling Bluetooth
Simply execute the command: sudo systemctl enable --now bluetooth.service.
Firewall
A firewall is essential! We use Firewalld for this purpose.
Execute paru -S firewalld to install the firewall. Execute sudo systemctl enable --now firewalld.service.
Summary
In this article, we have completed the basic system installation. Now you can freely explore the world of Linux!