-
-
Save jcchikikomori/0984ae8111496ea7544b6452adbbe180 to your computer and use it in GitHub Desktop.
Initialize Pacman
This file contains hidden or 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
#!/usr/bin/env bash | |
# Enable networkd and resolved | |
systemctl enable systemd-networkd | |
systemctl enable systemd-resolved | |
systemctl restart systemd-networkd | |
systemctl restart systemd-resolved | |
# Init pacman mirror | |
curl -s -L "https://archlinux.org/mirrorlist/?country=CN&country=JP&country=SG&country=KR&protocol=https&ip_version=4&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist | |
# Init key | |
pacman-key --init | |
# Init archlinux key | |
pacman-key --populate archlinux | |
# Sync repo | |
pacman -Syyu --noconfirm --noprogressbar | |
# Install commom package | |
pacman -S --noconfirm --noprogressbar sudo htop iftop mtr dkms lz4 bash-completion base-devel pacman-contrib git | |
# Sort repo by speed | |
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup | |
rankmirrors -n 5 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist | |
# Create non root user | |
useradd admin -m | |
passwd admin | |
# Add admin to wheel group | |
usermod -aG wheel admin | |
# Allow wheel group sudo | |
echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment