Arch Linux Recommendations
Procedure
Set the console keyboard layout
loadkeys jp106Update the system clock
timedatectl set-timezone Asia/Tokyo
timedatectl # 確認Partition the disk
fdisk -l # 確認Delete partition
fdisk /dev/nvme0n1
Command (m for help): p # パーティション確認
Command (m for help): d # パーティション削除
Command (m for help): w # 書き込みCreate partition
fdisk /dev/nvme0n1
Command (m for help): g # GPT作成EFI system partition (1GiB)
Command (m for help): n
Partition number: 1
First sector: (Enter)
Last sector: +1G
Command (m for help): t
Partition number: 1
Type: 1 # EFI SystemLinux swap (4GiB)
Command (m for help): n
Partition number: 2
First sector: (Enter)
Last sector: +4G
Command (m for help): t
Partition number: 2
Type: 19 # Linux swapLinux x86-64 root / (all remaining)
Command (m for help): n
Partition number: 3
First sector: (Enter)
Last sector: (Enter)Confirm partitions
Command (m for help): w # 書き込みFormat the partitions
# EFI
mkfs.fat -F 32 /dev/nvme0n1p1
# swap
mkswap /dev/nvme0n1p2
# root
mkfs.ext4 /dev/nvme0n1p3Mount the file systems
# root
mount /dev/nvme0n1p3 /mnt
# EFI
mount --mkdir /dev/nvme0n1p1 /mnt/boot
# swap
swapon /dev/nvme0n1p2Install essential packages
pacstrap -K /mnt base linux linux-firmware
pacman -S amd-ucodeText editor
pacman -S vi
echo "set number" >> ~/.vimrc # 行番号表示Configure the system
# フスタブ
genfstab -U /mnt >> /mnt/etc/fstab
# クルート
arch-chroot /mnt
# 時間
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
hwclock --systohc
# ローカリゼーション
locale-gen
cat /etc/locale.conf # 中身確認
echo "LANG=en_US.UTF-8" > /etc/locale.conf # 上書き保存
cat /etc/vconsole.conf # 中身確認
echo "KEYMAP=jp106" > /etc/vconsole.conf # 上書き保存
# ネットワーク構成
echo "yourhostname" > /etc/hostname
# ルートパスワード
passwd
# ブートローダー(GRUB)
pacman -S grub efibootmgr os-prober
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
# リブート
exit
reboot
# ログイン
rootReference
Installation guide - ArchWiki
https://wiki.archlinux.org/title/Installation_guide
