[測試] 手動安裝2022版Arch Linux

本帖最後由 pipikeung 於 2023-1-10 09:24 編輯

由零開始手動安裝Arch Linux-2022.10.01-x86_64.iso

在VirtualBox安裝,硬盤設為16G
用cfdisk分割成兩份,一份14G,一份2G
型格化/dev/sda1 ext4
設定 /dev/sda2 swap

mkfs.ext4 /dev/sda1
mkswap    /dev/sda2
swapon    /dev/sda2


創建目錄 /mnt/boot /mnt/home
mount /dev/sda1 /mnt
mkdir /mnt/boot /mnt/home

在/mnt中安裝系統
mount /dev/sda1 /mnt
pacstrap /mnt base linux linux-firmware vim nano

創建fstab
genfstab -U /mnt >> /mnt/etc/fstab
進入系統
arch-chroot /mnt

設定root密號,增加使用者pipikeung,使pipikeung具有sudo權限
passwd (輸入root密號)
useradd -m -g users -s /bin/bash pipikeung
passwd pipikeung (輸入pipikeung密號)

pacman -S sudo
nano /etc/sudoers
在root ALL=(ALL:ALL) ALL 下加入
pipikeung ALL=(ALL:ALL) ALL
存檔後登出 (Ctrl+O  Ctrl+x)


設定語言環境
nano /etc/locale.gen
刪去en_US.UTF-8  zh_TW.UTF-8  zh_HK.UTF-8前的「#」


locale-gen
安裝中文字型「文泉驛」
pacman -S wqy-zenhei

設定地域時間
ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime
hwclock --systohc  --utc


起動時使用中文繁體環境
nano /etc/locale.conf
內容
LANG=zh_TW.UTF-8
存檔後登出

設定桌面環境
pacman -S dhcpcd (在virtualBox安裝,起動時有網絡可用)
systemctl enable dhcpcd

安裝xfce4桌面環境
pacman -S xfce4 lightdm-gtk-greeter
systemctl enable lightdm


安裝音響軟件
pacman -s  pulseaudio pavucontrl

安裝xorg,grub
pacman -S xorg

pacman -S grub
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg


登出、重啟
exit
umount /mnt
shutdown now

退出在virtualbox的iso盤
重啟以pipikeung登入

安裝中文輸入法,起動時載入輸入法
sudo pacman -S fcitx-im fcitx-configtool fcitx-table-extra
sudo nano ~/.xprofile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
fcitx &
存檔後登出

安裝常用軟件
sudo pacman -S audaciou viewnior gnome-mpalyer firefox gimp gpated
sudo pacman -S libreoffice-fresh-zh-tw thunderbird-i18n-zh-tw

登出、重啟並將顯示器設為1920x1080
便有繁體中文介面的Arch Linux,安裝大功告成﹗

Arch Linux 完成後工作情況




若正式上機,啟動後使用NetworkManager連上wifi
安裝networkmanager
sudo pacman -S networkmanager
sudo systemctl start networkmanager
sudo systemctl enable networkmanager

nwcli device wifi list (顯示可用wifi)
nwcli device wifi SSID password yourpwd (連上wifi)

i also just installed redcore (a distro based on gentoo) and then back to archlinux.
i think i so get used to archlinux and can never change to other.
during my archlinux installation, i found arch take away one more thing from the previous version, that is you need to set root's password. in previous version i can boot up the newly installed system and then login as root without password, but can not do that this time.
i also found sshd was enabled in during installation (that may be true in previous version but i did not find out), so people can install archlinux in a headless machine by 1) change root's password by blind typing. or 2) make an installation image with archiso and add a ssh key under /root/.ssh/. may try next time.

TOP