3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Arch Linux のインストール

Last updated at Posted at 2023-06-13

こちらのページに従って、インストールしました。
Arch Linux をおしゃれに最速インストール

日本語設定についてはこちらを参考にしました。
Arch Linuxの日本語入力をfcitxからfcitx5に切り替える

インストール用USB の作成

ISO イメージのダウンロード

wget https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/iso/2024.01.01/archlinux-2024.01.01-x86_64.iso

USB への書き込み

sudo dd if=archlinux-2024.01.01-x86_64.iso of=/dev/sda oflag=direct bs=1048576

USB でブート

日本語キーボードの設定

loadkeys jp106

大きなフォントに変更

setfont ter-128n

ネットワークの設定

iwctl

デバイス名の確認

[iwd]# device list

接続ポイントの確認

[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks

ネットワークに接続

[iwd]# station wlan0 connect SSID

iwdコンソールを終了

[iwd]# exit

インストールするディスクの用意

状態の確認

lsblk

私は既存のパーティションを使いました。
SWAP は使わないので、EFI と root を用意しました。

nvme0n1p9   root
nvme0n1p11    EFI

フォーマット

root

mkfs.ext4 /dev/nvme0n1p9

EFI

mkfs.fat -F32 /dev/nvme0n1p11

マウント

root

mount /dev/nvme0n1p9 /mnt

EFI

mkdir /mnt/boot
mount /dev/nvme0n1p11 /mnt/boot

準備用パッケージを仮インストール

pacstrap /mnt base linux linux-firmware
pacstrap /mnt man-db vim

fstab の作成

genfstab -U /mnt >> /mnt/etc/fstab

chroot

arch-chroot /mnt

タイムゾーンの設定

ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
hwclock --systohc

ローカライゼーション

/etc/locale.gen
(省略)
en_US.UTF-8 UTF-8
(省略)
ja_JP.UTF-8 UTF-8
(省略)
locale-gen

ルートのパスワードの設定

passwd

GRUB の設定

必要パッケージのインストール

pacman -S grub efibootmgr dosfstools os-prober mtools

grub をインストール

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB_UEFI

設定ファイルの作成

grub-mkconfig -o /boot/grub/grub.cfg

プロセッサー用マイクロコードのインストール

私の端末は、AMD だったので

pacman -S amd-ucode

grub の設定ファイルを更新

grub-mkconfig -o /boot/grub/grub.cfg

ネットワークの設定に必要なパッケージをインストール

pacman -S networkmanager wpa_supplicant dialog
pacman -S iw iwd dhcpcd netctl

自動起動の設定

systemctl enable NetworkManager

リブート

reboot

パソコンの起動画面で、F2キー等を押して起動時設定画面に入り、 「GRUB_UEFI」の項目をBOOT順の1番目に設定。 もしくは、単純に、UEFIの起動項目で「GRUB_UEFI」から起動。

USBメモリは再起動後、抜く。

再起動後 root でログイン

ネットワークの設定

nmtui

システムのアップデート

pacman -Syy
pacman -Syu

ユーザーの作成

useradd -u 1200 -m -g wheel uchida
passwd uchida

グループの作成

groupadd -g 1200 uchida

sudo のインストール

pacman -S sudo
EDITOR=vim visudo
(省略)
%wheel ALL=(ALL:ALL) ALL
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
%sudo   ALL=(ALL:ALL) ALL
(省略)

root からログアウトし、作成した一般ユーザーでログインしなおす。

大きなフォントに変更

sudo pacman -S terminus-font
setfont ter-128n

X の設定

sudo pacman -S xorg-server xorg-xinit xorg-xclock xterm
sudo pacman -S xfce4

インストール可能なドライバーを調べる

pacman -Ss xf86-video

ドライバーのインストール

例えば

sudo pacman -S xf86-video-intel

X の起動

$HOME/.xinitrc
exec startxfce4
startx

Google Chrome のインストール

必要なライブラリーのインストール

sudo pacman -S git
sudo pacman -S fakeroot
sudo pacman -S make
sudo pacman -S gcc

yay のインストール

git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

yay を使ってインストール

yay -S google-chrome

フォントのインストール

sudo pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra
sudo pacman -S otf-ipafont

Google Chrome を起動して日本語のページがちゃんと表示されることを確認。

日本語入力

sudo pacman -S fcitx5-im fcitx5-mozc
$HOME/.xinitrc
export GTK_IM_MODULE="fcitx5"
export QT_IM_MODULE="fcitx5"
export XMODIFIERS='@im=fcitx5'

Ctrl + Blank で切り替え

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?