Last active
April 22, 2024 16:41
-
-
Save duzhaokun123/60244b3ac04bd4c6fc9998dbbfffffef to your computer and use it in GitHub Desktop.
archlinux lxc post install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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