Contents

Archlinux install

notes:

  • install archlinux from USB-Live
  • UEFI model install
  • something in square brackets is option
  • makeing a USB boot disk can search by gogole
1
ls /sys/firmware/efi/efivars

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>
1
2
timedatectl set-ntp true
timedatectl status

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>
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>
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
1
pacstrap /mnt base linux linux-firmware base-devel vim

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

1
2
3
4
//create fstab file
genfstab -U /mnt >> /mnt/etc/fstab
//check fstab
cat /mnt/etc/fstab
1
arch-chroot /mnt
1
2
3
ls /usr/share/zoneinfo
ln -sf /usr/share/zoneinfo/<your Region>/<your City> /etc/localtime
hwclock --systohc --utc
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
1
2
3
4
// 127.0.0.1 localhost
// ::1 localhost
// 127.0.1.1 myarch
vim /etc/hosts
1
passwd root
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
1
pacman -S iwd
 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

I add user into the group wheel

1
useradd -m -G "extra group" -s "login shell" "username"
1
2
3
pacman -S sudo
//add "yourname ALL=(ALL) ALL" under the line "root ALL=(ALL) ALL"
vim /etc/sudoers
1
2
3
4
//english font
pacman -S ttf-dejavu
//chinese fonts
pacman -S wqy-microhei
 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
1
2
3
4
reboot
exit
umount -R /mnt
reboot
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
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