Ubuntu Desktop
Before you start
Run as a user with sudo rights.
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 apt update &&\
sudo apt full-upgrade -y
Install
Install packages:
sudo apt install -y git curl vim htop
Settings
Scrolling: normal, not natural, for touchpads and mice. Run as tech in a terminal inside the desktop session (not over SSH, and not with sudo):
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false &&\
gsettings set org.gnome.desktop.peripherals.mouse natural-scroll false
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 apt install -y openssh-server
sudo systemctl enable --now ssh
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