New Machine Setup
Things to do on a new machine (e.g., new GCE VM).
GitHub
- install git
- generate an SSH key for GitHub.
- Bash
ssh-keygen -t ed25519 -C "YOUR_EMAIL_HERE" eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519
- Powershell
ssh-keygen -t ed25519 -C "YOUR_EMAIL_HERE" start-ssh-agent
- Bash
- add the public key to GitHub:
cat ~/.ssh/id_ed25519.pub
here - git config stuff:
git config --global user.name "YOUR_NAME_HERE" git config --global user.email "YOUR_EMAIL_HERE" git config --global core.filemode true
- (optional for Unix) add keychain:
sudo apt install keychain
, then add the following to.bashrc
:# Use `keychain` to load my SSH key /usr/bin/keychain -q --nogui $HOME/.ssh/id_ed25519 source $HOME/.keychain/$HOSTNAME-sh
OS-specific
WSL
Add the following to .bashrc
:
# allow opening webpages with Chrome
export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
This will allow opening URLs with sensible-browser
, and was enough to make Chrome pop up e.g., when Google’s Python API wants to authenticate the user via a webpage prompt. To make xdg-open
work additional fiddling is needed.