wget http://mirrors.163.com/archlinux/iso/latest/archlinux-2018.05.01-x86_64.iso
从ISO文件引导系统
更新系统时间
timedatectl set-ntp true
timedatectl status
磁盘分区
parted -a optimal /dev/sda
mklabel gpt
unit mib
mkpart primary 1 3
name 1 grub
set 1 bios_grub on
mkpart primary 3 256
name 2 boot
set 2 boot on
mkpart primary 256 8448
name 3 swap
mkpart primary 8448 -1
name 4 rootfs
print
quit
mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sda4
mkswap /dev/sda3
swapon /dev/sda3
mount /dev/sda4 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
安装Arch
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bk
grep 163.com /etc/pacman.d/mirrorlist.bk > /etc/pacman.d/mirrorlist
pacstrap /mnt base base-devel
genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc
mv /etc/locale.gen /etc/locale.gen.bk
cat <<EOF >/etc/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB18030
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
zh_CN.UTF-8 UTF-8
EOF
locale-gen
locale -a
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "kiba" > /etc/hostname
passwd
systemctl enable dhcpcd
pacman -S vim
安装Grub
pacman -S grub
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
exit
cd
umount -R /mnt
reboot
安装常用软件
pacman -S openssh
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes
EOF
systemctl enable sshd
systemctl start sshd
cat <<EOF >>/etc/pacman.conf
[archlinuxcn]
SigLevel = Optional TrustAll
Server = http://mirrors.163.com/archlinux-cn/$arch
EOF
pacman -Syy && pcman -Syu && pacman -S archlinuxcn-keyring
pacman -S yaourt
pacman -S wget git
mkdir /usr/share/pictures
wget http://b.hiphotos.baidu.com/zhidao/pic/item/1ad5ad6eddc451da88f9f31ab3fd5266d0163237.jpg -O /usr/share/pictures/background.jpg
安装GUI
pacman -S xorg xorg-xinit xf86-video-fbdev
pacman -S i3-wm i3status i3lock dmenu rxvt-unicode rxvt-unicode-terminfo conky feh
pacman -S ttf-font-awesome