Skip to content

Instantly share code, notes, and snippets.

@duzhaokun123
Last active April 22, 2024 16:41
Show Gist options
  • Save duzhaokun123/60244b3ac04bd4c6fc9998dbbfffffef to your computer and use it in GitHub Desktop.
Save duzhaokun123/60244b3ac04bd4c6fc9998dbbfffffef to your computer and use it in GitHub Desktop.
archlinux lxc post install
# Init pacman mirror
curl -s -L "https://www.archlinux.org/mirrorlist/?country=CN&protocol=http&ip_version=6" | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist
# Init key
pacman-key --init
# Init archlinux key
pacman-key --populate archlinux
# Update archlinux-keyring
yes '' | pacman -Sy archlinux-keyring
# Sync repo
yes '' | pacman -Syu
# Install utils
yes '' | pacman -S vim
# Clean cache
yes '' | pacman -Sc
# override network config
cat > /etc/systemd/network/0-eth0.network << EOF
[Match]
Name=eth0
[Network]
DHCP=yes
MulticastDNS=yes
EOF
networkctl reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment