Skip to content

Instantly share code, notes, and snippets.

@kevinwright
Last active October 25, 2023 08:28
  • Star 29 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kevinwright/6884737 to your computer and use it in GitHub Desktop.
Arch first-boot configuration. Setup the first user, sudo, vm tools, and enough of a dev env to support AUR+yaourt

OpenSSH daemon

pacman -S openssh
systemctl start sshd
systemctl enable sshd.socket

Sudoers

pacman -S sudo

Use sed to uncomment the wheel group from sudoers, then hijack the EDITOR variable to copy the modified version back via visudo.

sed 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers > /etc/sudoers.new
export EDITOR="cp /etc/sudoers.new"
visudo
rm /etc/sudoers.new

Create a non-root user

useradd -m -g users -G wheel -s /bin/bash kevin
passwd kevin

(If running under VMWare) Install VM tools

pacman -S open-vm-tools
pacman -S open-vm-tools-dkms

Check pacman output for the dkms version that needs to be installed, then

dkms add open-vm-tools/9.4.0

Start + Enable the daemon

cat /proc/version > /etc/arch-release
systemctl start vmtoolsd
systemctl enable vmtoolsd

(optional) Sync time to the host, alternatively set up NTP

vmware-toolbox-cmd timesync enable

NTP

pacman -S ntp
systemctl start ntpd
systemctl enable ntpd

Install webmin

pacman -S webmin
systemctl start webmin
systemctl enable webmin

Install dev tools for AUR

pacman -S --needed base-devel
pacman -S wget

Install Yaourt

Assuming the user kevin has created, is in the "wheel" group, and sudoers has been set up as above. Package builds should NOT be done as root.

su kevin
cd ~
mkdir builds && cd builds

wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz
tar -xvzf package-query.tar.gz
cd package-query
makepkg -s
sudo pacman -U package-query-*.xz

cd ~/builds
wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
tar -xvzf yaourt.tar.gz
cd yaourt
makepkg -s
sudo pacman -U yaourt-*.xz

exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment