pf's note (too old)
After booting from a USB stick, you'll get a zsh root shell
- ping google
# ping google.com
- the DHCP client daemon was started automatically
-
use
dhcpcd -korsystemctl stop dhcpcd.servicefirst to disable DHCP networking -
use
ipcommand andresolv.conf
# ip link # interface, something like 'eth0' or 'enp2s0'
# ip link set <if> up
# ip addr add <ip address>/<subnetmask> dev <if>
# ip route add default via <gateway's ip address>
# vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
search foo.bar.com
- remember to install
netctlafterchroot, otherwise the network will be broken after rebooting
# iw dev
# wifi-menu
- check for old partitions first
# fdisk -l
# lsblk
# lsblk -f
- Destroy the whole world
# cfdisk /dev/sda
=================================
An example for creating partition tabel
/ 25G /dev/sda1
swap 1G /dev/sda2
/home else /dev/sda3
- format partitions (
ext4)
# mkfs.ext4 /dev/sda1
# mkfs.ext4 /dev/sda3
- swap
# mkswap /dev/sda2 && swapon /dev/sda2
- check all things done well
# lsblk /dev/sda
# mount /dev/sda1 /mnt
# mkdir /mnt/home && mount /dev/sda3 /mnt/home
- choose NCTU or tku in Taiwan
# vi /etc/pacman.d/mirrorlist
- base system
# pacstrap -i /mnt base base-devel
- if the keylist is out-of-date
# pacman -S archlinux-keyring
# pacman-key --init && pacman-key --populate archlinux
# genfstab -U -p /mnt >> /mnt/etc/fstab
# cat /mnt/etc/fstab
- edit
/mnt/etc/fstaband adddiscard,noatimeif you're using SSD
# arch-chroot /mnt /bin/bash
# . /etc/profile
# PS1="(chroot) $PS1"
- remove comments for your locale
# vi /etc/locale.gen
en_US.UTF-8 UTF-8
en_US ISO-8859-1
zh_TW.UTF-8 UTF-8
# locale-gen
# locale
# echo "LANG=en_US.UTF-8" > /etc/locale.conf
# tzselect
# ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime
# hwclock --systohc --utc
- note:
/etc/timezoneis no longer used now Arch wiki: Time
- set hostname
# echo hostname > /etc/hostname
- add your hostname in
/etc/hosts
# vi /etc/hosts
-
Check Arch wiki: systemd-netowrkd for details.
-
enable systemd-networkd services
# systemctl enable systemd-networkd.service
# systemctl enable systemd-resolved.service
- do the following later after first reboot
- delete or rename the existing file and create the following symbolic link
# ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
networkctl list -a
networkctl status -a
# vim /etc/systemd/network/wired.network
----
[Match]
Name=enp1s0
[Network]
DHCP=ipv4
# vim /etc/systemd/network/wired.network
----
[Match]
Name=enp1s0
[Network]
Address=10.1.10.9/24
Gateway=10.1.10.1
-
try Wicd or basic
wifi-menu -
note:
dialogis required bywifi-menu
# pacman -S iw wpa_supplicant dialog
- you also can use
systemd-netowkrdfor your wireless networking - see Arch wiki: systemd-networkd
# mkinitcpio -p linux
- note: you might take a look of
/etc/mkinitcpio.confand add someHOOKSprobably
# passwd
# useradd -m xatier
# passwd xatier
# pacman -S grub os-prober
# grub-install --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
- add yaourt for pacman.conf
# vi /etc/pacman.conf
[archlinuxfr]
SigLevel = Optional
Server = https://repo.archlinux.fr/$arch
- update pacman
# pacman -Syyu
## exit
# umount /mnt/{home,}
# reboot
# su -
# pacman -S openssh vim sudo screen tmux htop rsync git acpi
# visudo
$ complete -cf sudo
- Vbox needs some special settings, see Archlinux wiki Virtualbox
$ sudo pacman -S alsa-utils xorg-server xorg-xinit xorg-utils xorg-server-utils mesa [xf86-video-intel xf86-video-ati xf86-video-nouveau xf86-video-vmware] xf86-input-synaptics ttf-dejavu ttf-inconsolata
$ sudo pacman -S awesome
$ vim ~/.xinitrc
exec awesome >> ~/.cache/awesome_stdout 2>> ~/.cache/awesome_stderr