(also works for a minimal Linux install)
Do this first!
sudo apt-get update && sudo apt-get dist-upgrade
Follow the instructions here to download and install the .deb
file, or run the following commands:
wget 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O code_latest_amd64.deb
sudo apt install ./code_latest_amd64.deb
Optionally, install nano
:
sudo apt-get install nano
(already installed on latest ChromeOS Debian releases)
sudo apt-get install python3 python3-dev python3-pip
Add the following lines to your ~/.profile
to add ~/.local/bin/
to your PATH
:
# Add local bin to PATH
export PATH="$PATH:$HOME/.local/bin"
Then run source ~/.profile
to load these environment variables into the current shell.
python3 already comes with venv
, but if you prefer virtualenv
, you can install it:
# Install virtualenv if you don't want to use python's built-in `venv`
pip install --user virtualenv
I like to create a global python3
virtual environment to use for ad-hoc development to avoid polluting the system install:
mkdir -p ~/Projects/virtualenvs
cd ~/Projects/virtualenvs
# If using built-in venv:
python3 -m venv pythonenv
# If using virtualenv instead of venv:
virtualenv -p python3 pythonenv
Add the following lines to your ~/.profile
to prevent installation of packages outside of a virtual environment. You can use the gpip
alias to circumvent this.
export PIP_REQUIRE_VIRTUALENV=true
gpip() {
PIP_REQUIRE_VIRTUALENV="" pip "$@"
}
Add the following lines to your ~/.profile
to easily activate your virtualenv
s with aliases.
alias pythonenv="source ~/Projects/virtualenvs/pythonenv/bin/activate"
Then run source ~/.profile
.
pythonenv
pip install numpy pandas ipython jupyter
jupyter notebook .
Generate a new ssh key:
ssh-keygen -t ed25519 -C "[email protected]"
If you set a passphrase on your ssh key, install keychain
to manage it:
sudo apt-get install keychain
Add the following lines to your ~/.profile
to only ask for your ssh key passphrase upon startup.
# Add ssh key to keychain
eval $(keychain -q --eval id_ed25519)
Then run source ~/.profile
.
Optionally, add the SSH key to your GitHub account and test it.
# Test ssh auth with GitHub
ssh -T [email protected]
Thank you for putting this together. This was very helpful.