-
-
Save chrismcfee/f7fa22276b86ba3cc5686cc20ae7e19f to your computer and use it in GitHub Desktop.
Init arch linux 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://www.archlinux.org/mirrorlist/?country=TH&country=SG&country=IN&country=JP&protocol=https&ip_version=4" | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist | |
# Init key | |
pacman-key --init | |
# Init archlinux key | |
pacman-key --populate archlinux\ | |
# update arch linux keyring or gpg signatures will fail | |
sudo pacman -S archlinux-keyring | |
# Sync repo | |
yes '' | pacman -Syyu | |
# Install commom package | |
yes '' | pacman -S sudo htop iftop mtr tmux dkms lz4 bash-completion base-devel pacman-contrib | |
# 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