← All OSes

CachyOS

Before you start

Run as a user with sudo rights.

CachyOS defaults to fish, but these steps use bash syntax. Make bash the login shell (asks for your password):

chsh -s /bin/bash

Then switch to bash in the current terminal:

bash

Let tech use sudo without a password. The last two lines set the permissions sudo expects and check the file’s syntax, since a broken sudoers file locks you out of sudo:

sudo tee /etc/sudoers.d/tech > /dev/null << 'EOF'
tech ALL=(ALL) NOPASSWD: ALL
EOF
sudo chmod 0440 /etc/sudoers.d/tech
sudo visudo -cf /etc/sudoers.d/tech

Time zone

Set the time zone to US Eastern:

sudo timedatectl set-timezone America/New_York

Turn on network time sync. Turning it off and on again forces an immediate sync, whichever time service the distro uses:

sudo timedatectl set-ntp false &&\
sudo timedatectl set-ntp true

Check the zone and sync status; look for Time zone: America/New_York and System clock synchronized: yes (it can take a few seconds):

timedatectl

Update

Update everything:

sudo pacman -Syu

Install

Install packages:

sudo pacman -S --needed git curl vim htop

Configure

SSH client config for tech (run as tech, not root). Accepts new host keys automatically and doesn’t save them:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
tee -a ~/.ssh/config > /dev/null << 'EOF'
Host *
    StrictHostKeyChecking=accept-new
    UserKnownHostsFile=/dev/null
EOF
chmod 600 ~/.ssh/config

Accept SSH logins with your keys (how keys work). Install and start the SSH server:

sudo pacman -S --needed openssh
sudo systemctl enable --now sshd

Trust the keys published at github.com/leewiscovitch.keys (run as tech):

mkdir -p ~/.ssh
chmod 700 ~/.ssh
curl -fsSL https://github.com/leewiscovitch.keys >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

Set git identity. It asks for your name and email, then sets them:

read -rp "Git name: " name &&\
read -rp "Git email: " email &&\
git config --global user.name "$name" &&\
git config --global user.email "$email" &&\
git config --global init.defaultBranch main

Optional

No steps yet.

Verify

Confirm OS version:

cat /etc/os-release