Skip to content

Instantly share code, notes, and snippets.

@libook
Last active August 25, 2018 04:56
Show Gist options
  • Save libook/2b39922c53882b2a6c68b76242b91cc3 to your computer and use it in GitHub Desktop.
Save libook/2b39922c53882b2a6c68b76242b91cc3 to your computer and use it in GitHub Desktop.
Arch Linux with Gnome installation
#!/usr/bin/env zsh
# http://dwz.cn/paoFnZPv
# Set the keyboard layout
loadkeys us &&
# Update the system clock
timedatectl set-ntp true &&
# Format the disk
mkfs.ext4 /dev/sda &&
# Mount the file system
mkdir root &&
mount /dev/sda root &&
# Set mirror
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup &&
echo "Server = https://mirrors.ustc.edu.cn/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist &&
# Install packages
pacstrap root \
base \
base-devel \
gnome \
git \
htop \
net-tools \
syslinux \
vim \
zsh \
&&
# Download root script
wget https://gist.githubusercontent.com/libook/2b39922c53882b2a6c68b76242b91cc3/raw/archlinux-gnome-install-root.sh -P root &&
# Chroot
arch-chroot root
#!/usr/bin/env zsh
# Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Install IdleBox
zsh -c "$(curl -fsSL https://raw.githubusercontent.com/libook/IdleBox/master/install)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment