Contents

Archlinux install

Make a U boot disk

notes:

  • install archlinux from USB-Live
  • UEFI model install
  • something in square brackets is option
  • makeing a USB boot disk can search by gogole

install archlinux system

check efi
1
ls /sys/firmware/efi/efivars
connect wifi used iwctl

If your wifi device the property Powered is off,and your device adapter the property Powered is off also,you should turn on the both.you can exec the following command in iwctl:

note:my adapter is phy0 and wifi device is wlan0

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
iwctl
//show your adapter list
adapter list
//show your device
device list
adapter <adatper-name> set-property Powered on
device <device-name> set-property Powered on

//scan wifi around
station <devicename> scan
//show the result that scan
station <devicename> get-networks
//connect the specified wifi
station <devicename> connect <wifi-ssid>
update your systemtime
1
2
timedatectl set-ntp true
timedatectl status
disk partition

I separate my disk : efi(1G),root(50G),home(180G),swap(30G)

1
2
3
4
//list your all disks
fdisk -l
//disk your choose partition---note that root partition is necessary
fdisk /dev/<your partition>
disk formatting
1
2
3
4
5
6
7
//root home is ext4 or other
mkfs.ext4 /dev/<your root/home partition>
//UEFI--EFI
mkfs.fat -F32 /dev/<your efi partition>
//swapp
mkswap /dev/<your swap partition>
swapon /dev/<your swap partition>
mount partitions
1
2
3
4
5
mount /dev/<your root partition> /mnt
mkdir /mnt/efi
mount /dev/<your efi partition> /mnt/efi
mkdir /mnt/home
mount /dev/<your home partition> /mnt/home
install linux and other necessary things
1
pacstrap /mnt base linux linux-firmware base-devel vim

**notes: **you have completed the base installation.

config system
1
2
3
4
//create fstab file
genfstab -U /mnt >> /mnt/etc/fstab
//check fstab
cat /mnt/etc/fstab
enter your installed archlinux
1
arch-chroot /mnt
set zone
1
2
3
ls /usr/share/zoneinfo
ln -sf /usr/share/zoneinfo/<your Region>/<your City> /etc/localtime
hwclock --systohc --utc
locale setting
1
2
3
4
5
6
//uncomment:en_US UTF-8,zh_CN UTF-8
vim /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
export LANG=en_US.UTF-8
echo myarch > /etc/hostname
network setting
1
2
3
4
// 127.0.0.1 localhost
// ::1 localhost
// 127.0.1.1 myarch
vim /etc/hosts
set root password
1
passwd root
grub
1
2
3
4
5
6
pacman -S grub efibootmgr dosfstools openssh os-prober mtools linux-headers linux-lts linux-lts-headers
// grub-install [--target=x86_64-efi] --efi-directory=/efi [--bootloader-id=<your boot name>]
grub-install --target=x86_64-efi --bootloader-id=<your boot name> --recheck
//set locale for grub
//cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
grub-mkconfig -o /boot/grub/grub.cfg
install network control tool : iwd
1
pacman -S iwd
config your network
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
//[General]
//EnableNetworkConfiguration=true
vim /etc/iwd/main.conf
//or install dhcpcd
pacman -S dhcpcd
systemctl start dhcpcd
systemctl enable dhcpcd
//start and enable some service about your networks
systemctl start iwd.service
systemctl enable iwd.service
systemctl start systemd-resolved.service
systemctl enable systemd-resolved.service

note: then you can connect your network like above

add user

I add user into the group wheel

1
useradd -m -G "extra group" -s "login shell" "username"
give user sudo permission
1
2
3
pacman -S sudo
//add "yourname ALL=(ALL) ALL" under the line "root ALL=(ALL) ALL"
vim /etc/sudoers
install fonts
1
2
3
4
//english font
pacman -S ttf-dejavu
//chinese fonts
pacman -S wqy-microhei
some other softwares
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
//Xarchiver is a front-end to various command line archiving tools for Linux and BSD operating systems, designed to be independent of the desktop environment.  It is the default archiving application of Xfce and LXDE.It handles encrypted *.7z, *.arj, *.lrz, *.rar and *.zip archives
   pacman -S xarchiver

   //mount filetype ntfs
   pacman -S ntfs-3g
   //voice
   //sudo pacman -S alsa-utils alsa-plugins alsa-lib
   //alsamixer
   pacman -S pulseaudio

   //you can install .deb
   //dpkg -i *****.dev
   pacman -S dpkg

   //some base-devel
   pacman -S base-devel
last
1
2
3
4
reboot
exit
umount -R /mnt
reboot

after entering arch

install display service
1
2
3
4
5
6
7
//install xorg(display server) or wayland()
<!-- pacman -S xorg -->
//install GPU driver that your computer supported
//intel
//pacman -S xf86-video-intel
//NVIDIA
//pacman -S xf86-video-nouveau
install xfce4 desktop
1
2
3
4
5
6
7
8
9
pacman -S xfce4 xfce4-goodies
pacman -S lightdm lightdm-gtk-greeter

//[Seat:*]
//...
//greeter-session=lightdm-gtk-greeter
//...
vim /etc/lightdm/lightdm.conf
systemctl enable lightdm.service

Or install gnome desktop

1
2
3
4
5
pacman -S xorg
pacman -S gnome
pacman start gdm.service
pacman enable gdm.service
systemctl enable NetworkManager.service

Or install sway desktop

1
2
3
4
5
6
pacman -S sway qt5-wayland
pacman -S gdm
//config auto start sway:add the following code into .zshrc(my login shell exec zsh)
if [ "$(tty)" = "/dev/tty1" ]; then
    exec sway
fi