Arch Linuxインストール(202603 ノーマル版)

1. はじめに

2026.03.01版でインストールを行う
2026-03-16時点の情報なので、これをご覧になっているころには変わっている可能性があります
ArchWikiのインストールガイド
インストールガイド
も大分ボリュームがあって、個人的に追っかけるのが億劫になってしまいましたので自分用まとめです

以下、コマンド部分のプロンプトが「#」はroot、「$」は一般ユーザであり、プロンプトがない部分はコマンドの結果や対話形式です 「[Enter]」が付いている部分が、入力、決定を行う部分です(空のまま押下する場合もあります)
なるべく初見の方でも分かるよう記述してるつもりなので、興味のある方はArch Linuxのインストールにチャレンジしてみてください

2. 前提条件

  1. EFI
  2. x86_64

3. インストール

3-1. BIOSの設定を確認

BIOSでSecure BootがOffになっているかを確認する
公式のメディアからの起動はセキュアブートに対応していない
Unified Extensible Firmware Interface/セキュアブート

3-2. ISOからの起動

ここは、特に問題ないかと
BIOSのBOOT ORDER(ブート順)を確認して、ISO(やメディア)から起動してください

3-3. setfont

高DPIの小型モニタとかだと、文字が小さすぎて読めない(読みづらい)ので、
/usr/share/kbd/consolefont
配下にある比較的大きいフォントにするとよい

# setfont solar24x32 [Enter]

ISOからBOOTした時点で、rootなので、上記コマンドをそのまま打てばよいはず

3-4. sshd

3-3の内容とも関連するかもしれませんが、ssh経由で接続してインストールすることも可能
これ、地味に便利です
手順としてはipアドレスを確認してから、rootのパスワードを設定してsshするだけです(鍵でイケるかどうかは未確認)

インストール側

# ip addr show
IPアドレスを確認
# passwd [Enter]
New password: xxxxx [Enter]
Retype new password: xxxxx [Enter]
passwd: password updated successfully

上記終了後、別のクライアントマシンで

$ ssh root@xxx.xxx.xxx.xxx [Enter]

で接続できるはず

3-5. ディスクの設定

fdiskでも何でもお好きなものでパーティションの分割を行ってください
以下のようなパーティションにしたいと思います

デバイスサイズマウントポイントパーティションタイプ
/dev/sdX11G/bootEFI System
/dev/sdX2残り全部/Linux FileSystem
/dev/sdX32GswapLinux swap
# fdisk -l [Enter]

上記結果は以下

Disk /dev/sda: 8 GiB, 8589934592 bytes, 16777216 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop0: 955.73 MiB, 1002160128 bytes, 1957344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

なので、/dev/sdaですね
(ちなみに、/dev/loop0の1GはBOOTメディアになります)

以下、パーティションの分割([Enter]があるところが自分で入力)

# fdisk /dev/sda [Enter]

Welcome to fdisk (util-linux 2.41.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS (MBR) disklabel with disk identifier 0x9c96ff3f.

Command (m for help): g [Enter]
Created a new GPT disklabel (GUID: 81C370CD-39D1-4F05-B777-D3D530F4ED31).

Command (m for help): n [Enter]
Partition number (1-128, default 1): [Enter]
First sector (2048-16777182, default 2048): [Enter]
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-16777182, default 16775167): +1G [Enter]

Created a new partition 1 of type 'Linux filesystem' and of size 1 GiB.

Command (m for help): t [Enter]
Selected partition 1
Partition type or alias (type L to list all): 1 [Enter]
Changed type of partition 'Linux filesystem' to 'EFI System'.

Command (m for help): n [Enter]
Partition number (2-128, default 2): [Enter]
First sector (2099200-16777182, default 2099200): [Enter]
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2099200-16777182, default 16775167): +5G [Enter]

Created a new partition 2 of type 'Linux filesystem' and of size 5 GiB.

Command (m for help): n [Enter]
Partition number (3-128, default 3): [Enter]
First sector (12584960-16777182, default 12584960): [Enter]
Last sector, +/-sectors or +/-size{K,M,G,T,P} (12584960-16777182, default 16775167): [Enter]

Created a new partition 3 of type 'Linux filesystem' and of size 2 GiB.

Command (m for help): t [Enter]
Partition number (1-3, default 3): [Enter]
Partition type or alias (type L to list all): 19 [Enter]

Changed type of partition 'Linux filesystem' to 'Linux swap'.

Command (m for help): p [Enter]
Disk /dev/sda: 8 GiB, 8589934592 bytes, 16777216 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 81C370CD-39D1-4F05-B777-D3D530F4ED31

Device        Start      End  Sectors Size Type
/dev/sda1      2048  2099199  2097152   1G EFI System
/dev/sda2   2099200 12584959 10485760   5G Linux filesystem
/dev/sda3  12584960 16775167  4190208   2G Linux swap

Command (m for help): w [Enter]
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

3-6. ファイルシステム作成

パーティションを切ったので、ファイルシステムを作成

# mkfs.fat -F32 /dev/sda1 [Enter]
mkfs.fat 4.2 (2021-01-31)
# mkfs.ext4 /dev/sda2 [Enter]
mke2fs 1.47.3 (8-Jul-2025)
Creating filesystem with 1310720 4k blocks and 327680 inodes
Filesystem UUID: 65fe8061-4f1f-4867-8ecf-f30d7264d792
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

# mkswap /dev/sda3 [Enter]
Setting up swapspace version 1, size = 2 GiB (2145382400 bytes)
no label, UUID=7b3b0119-475c-49df-bedd-6e78e7f9e967
# swapon /dev/sda3 [Enter]

3-7. マウント

ファイルシステムを作成したのでマウント

# mount /dev/sda2 /mnt [Enter]
# mkdir /mnt/boot [Enter]
# mount /dev/sda1 /mnt/boot [Enter]

3-8. 基本パッケージのインストール

# pacstrap -K /mnt base linux linux-firmware [Enter]
〜 以下略 〜
pacstrap -K /mnt base linux linux-firmware  28.18s user 14.19s system 54% cpu 1:17.61 total

3-9. /etc/fstabの生成

genfstabコマンドを使用して、/etc/fstabを生成する
個人的にはよくswaponを忘れたりするので、一旦確認してから書き込むようにしている

# genfstab -U /mnt [Enter]
# /dev/sda2
UUID=65fe8061-4f1f-4867-8ecf-f30d7264d792       /               ext4           rw,relatime      0 1

# /dev/sda1
UUID=4BD9-9B92          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro  0 2

# /dev/sda3
UUID=7b3b0119-475c-49df-bedd-6e78e7f9e967       none            swap           defaults         0 0

確認後、

# genfstab -U /mnt >> /mnt/etc/fstab [Enter]

3-10. chroot

arch-chrootを行い、chrootする

# arch-chroot /mnt [Enter]

プロンプトのスタイルが変わったらOK([root@archiso /]# みたく表示される)

3-11. 必要なパッケージのインストール

ここでやっているが、pacstrap時にやってもよい
個人的には、ここでやる方がしっくりくるのでこのタイミングで

# pacman -S openssh grub efibootmgr sudo vim [Enter]

3-12. ユーザの作成とパスワードの設定

私個人はrootのパスワードは設定せずsudoで運用するため、以下のようにする

# useradd -G wheel -d /home/xxx -m xxx [Enter]
# passwd xxx [Enter]
New password: xxxx [Enter]
Retype new password: xxxx [Enter]
passwd: password updated successfully

実際のユーザとパスワードは各環境で適切に設定してください

3-13. sudoの設定

今回は、wheelグループで運用
visudoで、
# %wheel ALL=(ALL:ALL) ALL
のコメントを外す
(実際の各環境では、適切にsudoの権限を付与してください)

# visudo [Enter]
# %wheel ALL=(ALL:ALL) ALL
↓
%wheel ALL=(ALL:ALL) ALL

3-14. sudoでログインできるか確認

# su - xxx [Enter]
$ sudo -i [Enter]

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

[sudo] password for xxx: xxx [Enter]
#

sudoではsudoを実行したユーザのパスワードを入力
root権限になれるか確認

3-15 ブートローダの設定

ArchWikiの
GRUB
を参考に

# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB [Enter]
Installing for x86_64-efi platform.
Installation finished. No error reported.
# grub-mkconfig -o /boot/grub/grub.cfg [Enter]
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

以降の内容は、再起動後でも可能です
ここで、再起動したい場合は

# exit [Enter]
# umount -R /mnt [Enter]
# reboot [Enter]

で再起動して、ディスクから起動するか確認ください
但しネットワークとsshdの設定をしていないので、リモート経由では接続できません

3-16. ネットワークの設定

個人的に、systemd-networkdとsystemd-resolvedを使うのが好きなので
まずは、ネットワークアダプタを確認

# ip addr show [Enter]
〜 省略 〜
2: enp0s3: 
〜 省略 〜

インターフェースは、enp0s3なので、これを覚えておく
次に、
/etc/systemd/network
配下に、拡張子がnetworkのファイルを作成(今回はDHCPで)

# echo "[Match]" > /etc/systemd/network/20-wired.network [Enter]
# echo "Name=enp0s3" >> /etc/systemd/network/20-wired.network [Enter]
# echo "" >> /etc/systemd/network/20-wired.network [Enter]
# echo "[Network]" >> /etc/systemd/network/20-wired.network [Enter]
# echo "DHCP=yes" >> /etc/systemd/network/20-wired.network [Enter]
# cat /etc/systemd/network/20-wired.network [Enter]
[Match]
Name=enp0s3

[Network]
DHCP=yes

ここまでできたら、

# systemctl enable systemd-networkd [Enter]
# systemctl enable systemd-resolved [Enter]

詳細は上述のArchWiki systemd-networkdを参照

さらに、resolv.confの設定
これをやらずにそのままにしておくと一部のアプリケーションなどで、DNSの解決に失敗する場合があるので、やっておいた方が無難

$ sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

3-17. sshdの設定

# systemctl enable sshd [Enter]

以上
ここまでできれば、再起動後sshで接続できるかと
以降は、再起動後でもできますし再起動せずにやることもできますが、再起動後にやる方がスムーズかと

3-18. ロケールの設定

ロケールを参考に以下

# cp -p /etc/locale.gen /etc/locale.gen.default [Enter]
# vim /etc/locale.gen [Enter]
#ja_JP.UTF-8 UTF-8
↓
ja_JP.UTF-8 UTF-8
# locale-gen [Enter]

以降は、再起動後に

# localectl set-locale LANG=ja_JP.UTF-8 [Enter]
# cat /etc/locale.conf [Enter]
LANG=ja_JP.UTF-8

3-19. タイムゾーンの設定

# timedatectl set-timezone Asia/Tokyo [Enter]
# timedatectl [Enter]
               Local time: 火 2026-03-17 00:03:18 JST
           Universal time: 月 2026-03-16 15:03:18 UTC
                 RTC time: 月 2026-03-16 15:03:19
                Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no
# ls -l /etc/localtime [Enter]
lrwxrwxrwx 1 root root 32  3月 17 00:03 /etc/localtime -> ../usr/share/zoneinfo/Asia/Tokyo

3-20. AURヘルパーのインストール

ArchWikiにもありますが、公式にはサポートされてません
AUR ヘルパー
ですが、使わないとAURにあるパッケージを検索するのが面倒なので個人的には使用しています
個人的にtrizenが好きなのでこれで

$ mkdir -p ~/work/trizen [Enter]
$ cd ~/work/trizen [Enter]
$ curl -L "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=trizen" -o PKGBUILD [Enter]
$ sudo pacman -S debugedit fakeroot [Enter]
$ makepkg -si [Enter]

makepkg後、[Y/n]の質問を何度か求められたり、インストール時にsudoのパスワードを求められたりしますが、全部通すとインストールされます
使い方は、一般ユーザで、

$ env EDITOR=vim trizen -Syu [Enter]

などとすればよいかと思います
env EDITOR=vim trizenの後は、pacmanのオプションとほぼ同じです
env EDITOR=vim trizenと毎回打つのが面倒なら、.bashrcなどにexport EDITORで環境変数を設定しておくか、trizenのエイリアスを作成すればよいかと

← Back