1097 lines
34 KiB
HTML
1097 lines
34 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.6.1/github-markdown.min.css"
|
|
/>
|
|
<title>haunt98 posts</title>
|
|
</head>
|
|
<style>
|
|
.markdown-body {
|
|
box-sizing: border-box;
|
|
min-width: 200px;
|
|
max-width: 980px;
|
|
margin: 0 auto;
|
|
padding: 45px;
|
|
font-family:
|
|
Shantell Sans Normal,
|
|
Rec Mono Casual,
|
|
SF Pro,
|
|
Inter,
|
|
sans-serif;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
font-family:
|
|
Berkeley Mono,
|
|
IBM Plex Mono,
|
|
SF Mono,
|
|
Jetbrains Mono,
|
|
monospace;
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.markdown-body {
|
|
padding: 15px;
|
|
}
|
|
}
|
|
</style>
|
|
<body class="markdown-body">
|
|
<h2>
|
|
<a href="index.html"><code>~</code></a>
|
|
</h2>
|
|
<div class="markdown-heading">
|
|
<h1 class="heading-element">Install Arch Linux</h1>
|
|
<a
|
|
id="user-content-install-arch-linux"
|
|
class="anchor"
|
|
aria-label="Permalink: Install Arch Linux"
|
|
href="#install-arch-linux"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
Install Arch Linux is thing I always want to do for my laptop/PC since I
|
|
had my laptop in ninth grade.
|
|
</p>
|
|
<p>
|
|
This is not a guide for everyone, this is just save for myself in a future
|
|
and for anyone who want to walk in my shoes.
|
|
</p>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/Installation_guide"
|
|
rel="nofollow"
|
|
>Installation guide</a
|
|
>
|
|
</h2>
|
|
<a
|
|
id="user-content-installation-guide"
|
|
class="anchor"
|
|
aria-label="Permalink: Installation guide"
|
|
href="#installation-guide"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h3 class="heading-element">Pre-installation</h3>
|
|
<a
|
|
id="user-content-pre-installation"
|
|
class="anchor"
|
|
aria-label="Permalink: Pre-installation"
|
|
href="#pre-installation"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>Check disks carefully:</p>
|
|
<div class="highlight highlight-source-shell"><pre>lsblk</pre></div>
|
|
<p>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/USB_flash_installation_medium"
|
|
rel="nofollow"
|
|
>USB flash installation medium</a
|
|
>
|
|
</p>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Verify the boot mode</h4>
|
|
<a
|
|
id="user-content-verify-the-boot-mode"
|
|
class="anchor"
|
|
aria-label="Permalink: Verify the boot mode"
|
|
href="#verify-the-boot-mode"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>Check UEFI mode:</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>cat /sys/firmware/efi/fw_platform_size
|
|
<span class="pl-c"><span class="pl-c">#</span> 64 or 32 is UEFI</span>
|
|
<span class="pl-c"><span class="pl-c">#</span> File not found is BIOS</span></pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Connect to the internet</h4>
|
|
<a
|
|
id="user-content-connect-to-the-internet"
|
|
class="anchor"
|
|
aria-label="Permalink: Connect to the internet"
|
|
href="#connect-to-the-internet"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
For wifi, use
|
|
<a href="https://wiki.archlinux.org/index.php/Iwd" rel="nofollow">iwd</a>.
|
|
</p>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Partition the disks</h4>
|
|
<a
|
|
id="user-content-partition-the-disks"
|
|
class="anchor"
|
|
aria-label="Permalink: Partition the disks"
|
|
href="#partition-the-disks"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
<a href="https://wiki.archlinux.org/index.php/GPT_fdisk" rel="nofollow"
|
|
>GPT fdisk</a
|
|
>:
|
|
</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>cgdisk /dev/sdx</pre>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/Partitioning#Partition_scheme"
|
|
rel="nofollow"
|
|
>Partition scheme</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/title/EFI_system_partition"
|
|
rel="nofollow"
|
|
>EFI system partition</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
<p>UEFI/GPT layout:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Mount point</th>
|
|
<th>Partition</th>
|
|
<th>Partition type</th>
|
|
<th>Suggested size</th>
|
|
<th>gdisk code</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>/mnt/efi</code></td>
|
|
<td><code>/dev/efi_system_partition</code></td>
|
|
<td>EFI System Partition</td>
|
|
<td>512 MiB</td>
|
|
<td>EF00</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>/mnt/boot</code></td>
|
|
<td><code>/dev/extended_boot_loader_partition</code></td>
|
|
<td>Extended Boot Loader Partition (XBOOTLDR)</td>
|
|
<td>1 GiB</td>
|
|
<td>EA00</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>/mnt</code></td>
|
|
<td><code>/dev/root_partition</code></td>
|
|
<td>Root Partition</td>
|
|
<td></td>
|
|
<td>8300</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
Why not <code>/boot/efi</code>? See
|
|
<a
|
|
href="https://github.com/systemd/systemd/pull/3757#issuecomment-234290236"
|
|
>Lennart Poettering comment</a
|
|
>.
|
|
</p>
|
|
<p>BIOS/GPT layout:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Mount point</th>
|
|
<th>Partition</th>
|
|
<th>Partition type</th>
|
|
<th>Suggested size</th>
|
|
<th>gdisk code</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td>BIOS boot partition</td>
|
|
<td>1 MiB</td>
|
|
<td>EF02</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>/mnt</code></td>
|
|
<td><code>/dev/root_partition</code></td>
|
|
<td>Root Partition</td>
|
|
<td></td>
|
|
<td>8300</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>LVM (optional):</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre><span class="pl-c"><span class="pl-c">#</span> Create physical volumes</span>
|
|
pvcreate /dev/sdaX
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Create volume groups</span>
|
|
vgcreate RootGroup /dev/sdaX /dev/sdaY
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Create logical volumes</span>
|
|
lvcreate -l +100%FREE RootGroup -n rootvol</pre>
|
|
</div>
|
|
<p>Format:</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre><span class="pl-c"><span class="pl-c">#</span> efi</span>
|
|
mkfs.fat -F32 /dev/efi_system_partition
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> boot</span>
|
|
mkfs.fat -F32 /dev/extended_boot_loader_partition
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> root</span>
|
|
mkfs.ext4 -L ROOT /dev/root_partition
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> root with btrfs (optional)</span>
|
|
mkfs.btrfs -L ROOT /dev/root_partition
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> root on lvm (optional)</span>
|
|
mkfs.ext4 /dev/RootGroup/rootvol</pre>
|
|
</div>
|
|
<p>Mount:</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre><span class="pl-c"><span class="pl-c">#</span> root</span>
|
|
mount /dev/root_partition /mnt
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> root with btrfs (optional)</span>
|
|
mount -o compress=zstd /dev/root_partition /mnt
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> root on lvm (optional)</span>
|
|
mount /dev/RootGroup/rootvol /mnt
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> efi</span>
|
|
mount --mkdir /dev/efi_system_partition /mnt/efi
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> boot</span>
|
|
mount --mkdir /dev/extended_boot_loader_partition /mnt/boot</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h3 class="heading-element">Installation</h3>
|
|
<a
|
|
id="user-content-installation"
|
|
class="anchor"
|
|
aria-label="Permalink: Installation"
|
|
href="#installation"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
Please check
|
|
<a href="https://wiki.archlinux.org/title/Mirrors" rel="nofollow"
|
|
>Mirrors</a
|
|
>
|
|
if you have slow Internet.
|
|
</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>pacstrap -K /mnt base linux linux-firmware
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> AMD (optional)</span>
|
|
pacstrap -K /mnt amd-ucode
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Intel (optional)</span>
|
|
pacstrap -K /mnt intel-ucode
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Btrfs (optional)</span>
|
|
pacstrap -K /mnt btrfs-progs
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> LVM (optional)</span>
|
|
pacstrap -K /mnt lvm2
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> zsh (optional)</span>
|
|
pacstrap -K /mnt zsh
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Text editor</span>
|
|
pacstrap -K /mnt neovim</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h3 class="heading-element">Configure</h3>
|
|
<a
|
|
id="user-content-configure"
|
|
class="anchor"
|
|
aria-label="Permalink: Configure"
|
|
href="#configure"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">
|
|
<a href="https://wiki.archlinux.org/index.php/Fstab" rel="nofollow"
|
|
>fstab</a
|
|
>
|
|
</h4>
|
|
<a
|
|
id="user-content-fstab"
|
|
class="anchor"
|
|
aria-label="Permalink: fstab"
|
|
href="#fstab"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>genfstab -U /mnt <span class="pl-k">>></span> /mnt/etc/fstab</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Chroot</h4>
|
|
<a
|
|
id="user-content-chroot"
|
|
class="anchor"
|
|
aria-label="Permalink: Chroot"
|
|
href="#chroot"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>arch-chroot /mnt</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Time zone</h4>
|
|
<a
|
|
id="user-content-time-zone"
|
|
class="anchor"
|
|
aria-label="Permalink: Time zone"
|
|
href="#time-zone"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre><span class="pl-c"><span class="pl-c">#</span> Change Region/City to your location</span>
|
|
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
|
|
|
|
hwclock --systohc</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Localization:</h4>
|
|
<a
|
|
id="user-content-localization"
|
|
class="anchor"
|
|
aria-label="Permalink: Localization:"
|
|
href="#localization"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
Edit <code>/etc/locale.gen</code> then uncomment
|
|
<code># en_US.UTF-8 UTF-8</code> by removing <code>#</code> at the
|
|
beginning.
|
|
</p>
|
|
<p>Generate locales:</p>
|
|
<div class="highlight highlight-source-shell"><pre>locale-gen</pre></div>
|
|
<p>Edit <code>/etc/locale.conf</code>:</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre>LANG=en_US.UTF-8</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Network configuration</h4>
|
|
<a
|
|
id="user-content-network-configuration"
|
|
class="anchor"
|
|
aria-label="Permalink: Network configuration"
|
|
href="#network-configuration"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>Edit <code>/etc/hostname</code>:</p>
|
|
<div class="highlight highlight-text-adblock"><pre>myhostname</pre></div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Initramfs</h4>
|
|
<a
|
|
id="user-content-initramfs"
|
|
class="anchor"
|
|
aria-label="Permalink: Initramfs"
|
|
href="#initramfs"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>Edit <code>/etc/mkinitcpio.conf</code>:</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre><span class="pl-c"># https://wiki.archlinux.org/title/mkinitcpio#Common_hooks</span>
|
|
<span class="pl-c"># Replace udev with systemd</span>
|
|
<span class="pl-c">#</span>
|
|
<span class="pl-c"># LVM (optional)</span>
|
|
<span class="pl-c"># https://wiki.archlinux.org/title/Install_Arch_Linux_on_LVM#Adding_mkinitcpio_hooks</span>
|
|
<span class="pl-c"># Add lvm2 between block and filesystems</span>
|
|
<span class="pl-c">#</span>
|
|
HOOKS=(base systemd ... block lvm2 filesystems)</pre>
|
|
</div>
|
|
<div class="highlight highlight-source-shell"><pre>mkinitcpio -P</pre></div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Root password</h4>
|
|
<a
|
|
id="user-content-root-password"
|
|
class="anchor"
|
|
aria-label="Permalink: Root password"
|
|
href="#root-password"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="highlight highlight-source-shell"><pre>passwd</pre></div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">
|
|
<a href="https://wiki.archlinux.org/title/NetworkManager" rel="nofollow"
|
|
>NetworkManager</a
|
|
>
|
|
</h4>
|
|
<a
|
|
id="user-content-networkmanager"
|
|
class="anchor"
|
|
aria-label="Permalink: NetworkManager"
|
|
href="#networkmanager"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>pacman -Syu networkmanager dhcpcd iwd
|
|
systemctl <span class="pl-c1">enable</span> NetworkManager.service
|
|
systemctl <span class="pl-c1">enable</span> systemd-resolved.service</pre>
|
|
</div>
|
|
<p>Edit <code>/etc/NetworkManager/conf.d/wifi_backend.conf</code>:</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre>[<span class="pl-ii">device</span>]
|
|
wifi.backend=iwd</pre>
|
|
</div>
|
|
<p>Edit <code>/etc/NetworkManager/conf.d/wifi_rand_mac.conf</code>:</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre>[<span class="pl-ii">device-mac-randomization</span>]
|
|
wifi.scan-rand-mac-address=yes
|
|
|
|
[<span class="pl-ii">connection-mac-randomization</span>]
|
|
ethernet.cloned-mac-address=stable
|
|
wifi.cloned-mac-address=stable</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">
|
|
<a href="https://wiki.archlinux.org/title/Bluetooth" rel="nofollow"
|
|
>Bluetooth</a
|
|
>
|
|
</h4>
|
|
<a
|
|
id="user-content-bluetooth"
|
|
class="anchor"
|
|
aria-label="Permalink: Bluetooth"
|
|
href="#bluetooth"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>pacman -Syu bluez
|
|
systemctl <span class="pl-c1">enable</span> bluetooth.service</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Clock</h4>
|
|
<a
|
|
id="user-content-clock"
|
|
class="anchor"
|
|
aria-label="Permalink: Clock"
|
|
href="#clock"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
Use
|
|
<a
|
|
href="https://wiki.archlinux.org/title/Systemd-timesyncd"
|
|
rel="nofollow"
|
|
>systemd-timesyncd</a
|
|
>
|
|
</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>timedatectl set-ntp <span class="pl-c1">true</span>
|
|
|
|
timedatectl status</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Boot loader</h4>
|
|
<a
|
|
id="user-content-boot-loader"
|
|
class="anchor"
|
|
aria-label="Permalink: Boot loader"
|
|
href="#boot-loader"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
Use
|
|
<a href="https://wiki.archlinux.org/index.php/Systemd-boot" rel="nofollow"
|
|
>systemd-boot</a
|
|
>
|
|
</p>
|
|
<p>Install using XBOOTLDR:</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>bootctl --esp-path=/efi --boot-path=/boot install
|
|
|
|
systemctl <span class="pl-c1">enable</span> systemd-boot-update.service</pre>
|
|
</div>
|
|
<p>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label"
|
|
rel="nofollow"
|
|
>Label partition</a
|
|
>
|
|
</p>
|
|
<p>Edit <code>/efi/loader/loader.conf</code>:</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre>
|
|
default archlinux.conf
|
|
timeout 4
|
|
editor no
|
|
console-mode max</pre
|
|
>
|
|
</div>
|
|
<p>Edit <code>/boot/loader/entries/archlinux.conf</code>:</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre>title Arch Linux
|
|
linux /vmlinuz-linux
|
|
|
|
<span class="pl-c"># Intel (optional)</span>
|
|
initrd /intel-ucode.img
|
|
|
|
<span class="pl-c"># AMD (optional)</span>
|
|
initrd /amd-ucode.img
|
|
|
|
initrd /initramfs-linux.img
|
|
|
|
<span class="pl-c"># Kernel parameters (optional)</span>
|
|
<span class="pl-c">#</span>
|
|
<span class="pl-c"># Acer Nitro AN515-45</span>
|
|
<span class="pl-c"># https://wiki.archlinux.org/title/backlight#Kernel_command-line_options</span>
|
|
<span class="pl-c"># acpi_backlight=vendor</span>
|
|
<span class="pl-c">#</span>
|
|
<span class="pl-c"># NVIDIA</span>
|
|
<span class="pl-c"># https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting</span>
|
|
<span class="pl-c"># nvidia-drm.modeset=1</span>
|
|
<span class="pl-c">#</span>
|
|
options root="LABEL=ROOT" rw quiet loglevel=3 nowatchdog module_blacklist=iTCO_wdt,sp5100_tco ipv6.disable=1 init_on_alloc=1 init_on_free=1 page_alloc.shuffle=1</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/General_recommendations"
|
|
rel="nofollow"
|
|
>General recommendations</a
|
|
>
|
|
</h2>
|
|
<a
|
|
id="user-content-general-recommendations"
|
|
class="anchor"
|
|
aria-label="Permalink: General recommendations"
|
|
href="#general-recommendations"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
Always remember to check <strong>dependencies</strong> when install
|
|
packages.
|
|
</p>
|
|
<div class="markdown-heading">
|
|
<h3 class="heading-element">System administration</h3>
|
|
<a
|
|
id="user-content-system-administration"
|
|
class="anchor"
|
|
aria-label="Permalink: System administration"
|
|
href="#system-administration"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
<a href="https://wiki.archlinux.org/index.php/sudo" rel="nofollow">Sudo</a
|
|
>:
|
|
</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>pacman -Syu sudo
|
|
|
|
EDITOR=nvim visudo
|
|
<span class="pl-c"><span class="pl-c">#</span> Uncomment group wheel by removing % at the beginning of %wheel ...</span>
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Add user if don't want to use systemd-homed</span>
|
|
useradd -m -G wheel -c <span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> joker
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Or using zsh (optional)</span>
|
|
useradd -m -G wheel -s /usr/bin/zsh -c <span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> joker
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Set password</span>
|
|
passwd joker</pre>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/Systemd-homed"
|
|
rel="nofollow"
|
|
>systemd-homed (optional if no useradd before)</a
|
|
>:
|
|
</li>
|
|
<li>
|
|
<a href="https://systemd.io/HOME_DIRECTORY/" rel="nofollow"
|
|
>Home Directories</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>systemctl <span class="pl-c1">enable</span> systemd-homed.service
|
|
|
|
homectl create joker --real-name=<span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> --member-of=wheel
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Using zsh (optional)</span>
|
|
homectl update joker --shell=/usr/bin/zsh</pre>
|
|
</div>
|
|
<p>
|
|
<strong>Note</strong>: Can not run <code>homectl</code> when install Arch
|
|
Linux. Should run on the first boot.
|
|
</p>
|
|
<div class="markdown-heading">
|
|
<h3 class="heading-element">Desktop Environment</h3>
|
|
<a
|
|
id="user-content-desktop-environment"
|
|
class="anchor"
|
|
aria-label="Permalink: Desktop Environment"
|
|
href="#desktop-environment"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
Install
|
|
<a href="https://wiki.archlinux.org/index.php/Xorg" rel="nofollow">Xorg</a
|
|
>:
|
|
</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>pacman -Syu xorg-server
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Remember to install GPU driver</span></pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">
|
|
<a href="https://wiki.archlinux.org/title/KDE" rel="nofollow">KDE</a>
|
|
</h4>
|
|
<a
|
|
id="user-content-kde"
|
|
class="anchor"
|
|
aria-label="Permalink: KDE"
|
|
href="#kde"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
See
|
|
<a
|
|
href="https://community.kde.org/Distributions/Packaging_Recommendations"
|
|
rel="nofollow"
|
|
>KDE Distributions/Packaging Recommendations</a
|
|
>
|
|
</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>pacman -Syu plasma-desktop
|
|
|
|
<span class="pl-c"><span class="pl-c">#</span> Login manager</span>
|
|
pacman -Syu sddm</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h4 class="heading-element">Worth trying</h4>
|
|
<a
|
|
id="user-content-worth-trying"
|
|
class="anchor"
|
|
aria-label="Permalink: Worth trying"
|
|
href="#worth-trying"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
<a href="https://wiki.archlinux.org/title/COSMIC" rel="nofollow"
|
|
>COSMIC</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://wiki.archlinux.org/title/Pantheon" rel="nofollow"
|
|
>Pantheon</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/List_of_applications"
|
|
rel="nofollow"
|
|
>List of applications</a
|
|
>
|
|
</h2>
|
|
<a
|
|
id="user-content-list-of-applications"
|
|
class="anchor"
|
|
aria-label="Permalink: List of applications"
|
|
href="#list-of-applications"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h3 class="heading-element">
|
|
<a href="https://wiki.archlinux.org/index.php/pacman" rel="nofollow"
|
|
>pacman</a
|
|
>
|
|
</h3>
|
|
<a
|
|
id="user-content-pacman"
|
|
class="anchor"
|
|
aria-label="Permalink: pacman"
|
|
href="#pacman"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>Uncomment in <code>/etc/pacman.conf</code>:</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre><span class="pl-c"># Misc options</span>
|
|
Color
|
|
ParallelDownloads</pre>
|
|
</div>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>systemctl <span class="pl-c1">enable</span> paccache.timer</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h3 class="heading-element">
|
|
<a href="https://wiki.archlinux.org/title/PipeWire" rel="nofollow"
|
|
>Pipewire</a
|
|
>
|
|
</h3>
|
|
<a
|
|
id="user-content-pipewire"
|
|
class="anchor"
|
|
aria-label="Permalink: Pipewire"
|
|
href="#pipewire"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>
|
|
pacman -Syu pipewire wireplumber \
|
|
pipewire-alsa pipewire-pulse \
|
|
gst-plugin-pipewire pipewire-v4l2</pre
|
|
>
|
|
</div>
|
|
<p>
|
|
See
|
|
<a
|
|
href="https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture"
|
|
rel="nofollow"
|
|
>Advanced Linux Sound Architecture</a
|
|
>
|
|
</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>pacman -Syu sof-firmware</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h3 class="heading-element">
|
|
<a href="https://wiki.archlinux.org/title/Flatpak" rel="nofollow"
|
|
>Flatpak</a
|
|
>
|
|
</h3>
|
|
<a
|
|
id="user-content-flatpak"
|
|
class="anchor"
|
|
aria-label="Permalink: Flatpak"
|
|
href="#flatpak"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>pacman -Syu flatpak</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/improving_performance"
|
|
rel="nofollow"
|
|
>Improving performance</a
|
|
>
|
|
</h2>
|
|
<a
|
|
id="user-content-improving-performance"
|
|
class="anchor"
|
|
aria-label="Permalink: Improving performance"
|
|
href="#improving-performance"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/swap#Swap_file"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/index.php/swap#Swap_file</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/swap#Swappiness"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/index.php/swap#Swappiness</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/Systemd/Journal#Journal_size_limit"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/index.php/Systemd/Journal#Journal_size_limit</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/Core_dump#Disabling_automatic_core_dumps"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/index.php/Core_dump#Disabling_automatic_core_dumps</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/title/Ext4#Enabling_fast_commit_in_existing_filesystems"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/title/Ext4#Enabling_fast_commit_in_existing_filesystems</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/Solid_state_drive#Periodic_TRIM"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/index.php/Solid_state_drive#Periodic_TRIM</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/index.php/Silent_boot"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/index.php/Silent_boot</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/title/Improving_performance#Watchdogs"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/title/Improving_performance#Watchdogs</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/title/Sysctl#Enable_TCP_Fast_Open"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/title/Sysctl#Enable_TCP_Fast_Open</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://lwn.net/Articles/842385/" rel="nofollow"
|
|
>Fast commits for ext4</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://lwn.net/Articles/508865/" rel="nofollow"
|
|
>TCP Fast Open: expediting web services</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://lwn.net/Articles/911219/" rel="nofollow"
|
|
>The search for the correct amount of split-lock misery</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Edit <code>/etc/systemd/journald.conf.d/00-journal-size.conf</code> then
|
|
restart:
|
|
</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre>[<span class="pl-ii">Journal</span>]
|
|
SystemMaxUse=50M</pre>
|
|
</div>
|
|
<p>
|
|
Edit <code>/etc/systemd/coredump.conf.d/custom.conf</code> then restart:
|
|
</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre>[<span class="pl-ii">Coredump</span>]
|
|
Storage=none
|
|
ProcessSizeMax=0</pre>
|
|
</div>
|
|
<p>Enable ext4 fast commit:</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>tune2fs -O fast_commit /dev/partition</pre>
|
|
</div>
|
|
<p>Periodic TRIM:</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>systemctl <span class="pl-c1">enable</span> fstrim.timer</pre>
|
|
</div>
|
|
<p>Edit <code>/etc/sysctl.d/99-sysctl.conf</code>:</p>
|
|
<div class="highlight highlight-text-adblock">
|
|
<pre><span class="pl-c"># Enable TCP Fast Open</span>
|
|
net.ipv4.tcp_fastopen = 3
|
|
|
|
kernel.split_lock_mitigate = 0</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">
|
|
<a href="https://wiki.archlinux.org/title/Security" rel="nofollow"
|
|
>Security</a
|
|
>
|
|
</h2>
|
|
<a
|
|
id="user-content-security"
|
|
class="anchor"
|
|
aria-label="Permalink: Security"
|
|
href="#security"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/title/IPv6#Disable_IPv6"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/title/IPv6#Disable_IPv6</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://lwn.net/Articles/791380/" rel="nofollow"
|
|
>add init_on_alloc/init_on_free boot options</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://lwn.net/Articles/776228/" rel="nofollow"
|
|
>mm: Randomize free memory</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://lwn.net/Articles/925941/" rel="nofollow"
|
|
>mm: introduce Designated Movable Blocks</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre><span class="pl-c"><span class="pl-c">#</span> Kernel parameters</span></pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">Hardware dependent</h2>
|
|
<a
|
|
id="user-content-hardware-dependent"
|
|
class="anchor"
|
|
aria-label="Permalink: Hardware dependent"
|
|
href="#hardware-dependent"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
<a href="https://wiki.archlinux.org/title/Laptop" rel="nofollow"
|
|
>https://wiki.archlinux.org/title/Laptop</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://wiki.archlinux.org/title/ASUS_Linux" rel="nofollow"
|
|
>https://wiki.archlinux.org/title/ASUS_Linux</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://wiki.archlinux.org/title/PRIME" rel="nofollow"
|
|
>https://wiki.archlinux.org/title/PRIME</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">Experiment</h2>
|
|
<a
|
|
id="user-content-experiment"
|
|
class="anchor"
|
|
aria-label="Permalink: Experiment"
|
|
href="#experiment"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>Do it at your own risk!!!</p>
|
|
<ul>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/title/Unified_kernel_image"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/title/Unified_kernel_image</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave"
|
|
rel="nofollow"
|
|
>https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://madaidans-insecurities.github.io/guides/linux-hardening.html"
|
|
rel="nofollow"
|
|
>Linux Hardening Guide</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/GrapheneOS/hardened_malloc"
|
|
>https://github.com/GrapheneOS/hardened_malloc</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/AdnanHodzic/auto-cpufreq"
|
|
>https://github.com/AdnanHodzic/auto-cpufreq</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/nbfc-linux/nbfc-linux"
|
|
>https://github.com/nbfc-linux/nbfc-linux</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">Maintenance</h2>
|
|
<a
|
|
id="user-content-maintenance"
|
|
class="anchor"
|
|
aria-label="Permalink: Maintenance"
|
|
href="#maintenance"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>
|
|
See
|
|
<a
|
|
href="https://wiki.archlinux.org/title/Pacman/Tips_and_tricks"
|
|
rel="nofollow"
|
|
>pacman/Tips and tricks</a
|
|
>
|
|
</p>
|
|
<div class="highlight highlight-source-shell">
|
|
<pre>sudo pacman -Syu</pre>
|
|
</div>
|
|
<div class="markdown-heading">
|
|
<h2 class="heading-element">In the end</h2>
|
|
<a
|
|
id="user-content-in-the-end"
|
|
class="anchor"
|
|
aria-label="Permalink: In the end"
|
|
href="#in-the-end"
|
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
|
></a>
|
|
</div>
|
|
<p>This guide is updated regularly I promise.</p>
|
|
|
|
<div>
|
|
Feel free to ask me via
|
|
<a href="mailto:hauvipapro+posts@gmail.com">email</a> or
|
|
<a rel="me" href="https://hachyderm.io/@haunguyen">Mastodon</a>.
|
|
<br />Source code is available on
|
|
<a href="https://github.com/haunt98/posts-go">GitHub</a>
|
|
<a href="https://codeberg.org/yoshie/posts-go">Codeberg</a>
|
|
<a href="https://git.sr.ht/~youngyoshie/posts-go">sourcehut</a>
|
|
<a href="https://gitea.treehouse.systems/yoshie/posts-go">Treehouse</a>
|
|
<a href="https://gitlab.com/youngyoshie/posts-go">GitLab</a>
|
|
</div>
|
|
</body>
|
|
</html>
|