Skip to content
Adam Conkey edited this page Aug 20, 2024 · 27 revisions

Linux Setup

Writing Disk Image

I use balenaEtcher on MacOS to write a disk image to a USB flash drive.

Install Software

Install Chrome

cd ~/Downloads
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current.amd64.deb

snap Installs

sudo snap install slack spotify
sudo snap install emacs --classic

apt Installs

sudo apt install \
    build-essential \
    cargo \
    curl \
    git \
    git-lfs \
    htop \
    texlive-full \
    tmux \
    xclip

cargo Installs

cargo install dutree bat exa

NVIDIA Driver

  1. Enter your GPU information here to figure out which run file to download.
  2. sudo apt purge nvidia* if there were any drivers already installed on the machine.
  3. Reboot machine and enter TTY terminal with Ctrl + Alt + F2
  4. Run the script:
    cd ~/Downloads
    sudo chmod +x NVIDIA-Linux-x86_64-525.60.11.run  # Whatever your file is named
    sudo ./NVIDIA-Linux-x86_64-525.60.11.run
  5. Follow the prompts until it succeeds, and reboot.

SSH

Create New SSH Key

  1. Do ssh-keygen and follow prompts, use defaults.
  2. Copy public key to clipboard: xclip -sel c < ~/.ssh/id_rsa.pub
  3. Add the key where you need it, e.g. GitHub

Copy Key to Remote for Password-less Login

  1. Do ssh-copy-id -i ~/.ssh/id_rsa.pub user@remote
  2. Enter your password for the remote host when asked.
  3. Now you should be able to connect via SSH without entering a password.

SSH Server

If you want to enable connecting to your machine via SSH:

  1. Install the SSH server: sudo apt install openssh-server
  2. Change the port to something other than 22 to thwart script kiddies:
    1. sudo emacs /etc/ssh/sshd_config
    2. Change the line #Port 22 to Port 5522 (i.e. uncomment and change the port number as desired)
  3. sudo systemctl restart ssh
  4. sudo systemctl status ssh. You should see it indicating it's actively running with the port you specified above.