Configuring a new computer
This post is mostly for my future self, but others may find it useful. Most of the software applications are cross-platform, but some are specific to certain operating systems.
General
- Replace the preinstalled antivirus trial with something legitimate. If you don’t do this first the popups will drive you insane.
- Uninstall bloatware, trials, games, etc.
- Disable personalization and related ‘features’
- Disable unnecessary programs at startup
- Windows: Disable Bing in the Windows 11 start menu (instructions)
- Of course, subscribe to Trial Inference for clinical trial analysis and monitoring. More on that here.
Cross-platform programs:
- Inkscape
- Brave browser
- Docker desktop
- VS Code - use Settings Sync to easily port entire setup (extensions, keybindings, fonts, etc.) to a new machine or Codespaces
- Alacritty - modern terminal emulator, configured for WSL 2 as follows in the file
%APPDATA%\alacritty\alacritty.toml:
Windows programs:
- paint.net
[shell]
args = ["--cd ~"]
program = "wsl"
Software dev
First things first
If you’re on Windows, install WSL2 using PowerShell as an administrator:
wsl --install -d Ubuntu-22.04
then updates, upgrades, and basics:
sudo apt update
sudo apt upgrade
sudo apt install ripgrep tree tmux
ssh, gpg, and git
Generate a GPG key for signing commits:
gpg --full-generate-key
WSL 2 needed the following added to ~/.profile to avoid the error gpg failed to sign the data:
export GPG_TTY=$(tty)
Configure git:
git config --global user.email "github_username@users.noreply.github.com"
git config --global user.name "name"
git config --global core.editor vim
git config --global commit.gpgsign true
gpg --list-secret-keys --keyid-format=long
Now use signing key from above command:
git config --global user.signingkey <16 character key>
Create an ssh key for GitHub:
ssh-keygen -t ed25519 -C "github_username@users.noreply.github.com"
Developer experience
- starship - fast and useful prompt e.g. displays current git branch and Node version
- fzf - fast finding. I suggest installing with
gitsince package manager versions can be quite outdated. Enable key bindings. - ripgrep - rust alternative of
grep, installed in command above - zoxide - avoid repeatedly typing ridiculous change directory commands like
cd ../some/other/long/path - nvm - install and switch between multiple
nodeenvironments seamlessly - miniforge - python package manager without the environment solving issues. Bonus tip: use
mambainstead ofconda. - My own vim preferences
- gitalias simplifies git e.g.
git cinstead ofgit commitandgit sinstead ofgit status. It might seem unimportant, but the frequency with which these commands are used can accrue nontrivial time and keystroke savings. There are also handy aliases for when you find yourself in some weird merge hell and need to torch everything and reset to upstream / pristine.curl https://raw.githubusercontent.com/GitAlias/gitalias/main/gitalias.txt -o ~/.gitalias.txt git config --global include.path ~/.gitalias.txt - difftastic generates diffs that better distinguish meaningful changes from formatting changes e.g. nesting, alignment, and wrapping. To make it the git default, ensure the executable is available in your path, then add the following to
~/.gitconfig:[diff] external = difft .bashrcaliases and exports. At a bare minimum, for me:alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' alias v="vim" alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../.."
Let me know if there is anything I missed!
Share on:
This work by
Derek Croote
is licensed under
CC BY-NC 4.0