Do this first!
sudo apt-get update && sudo apt-get dist-upgrade
sudo passwd root
Download and install Sublime by adding its repository:
sudo apt-get install wget gnupg gnupg1 gnupg2
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text
In your user settings (Preferences > Settings), add "dpi_scale": 2
so that the text is reasonably sized on a HiDPI screen.
Follow the instructions here (you will need to wget
the linked .deb
file first).
See here for instructions on how to edit the DPI settings.
Optionally, install nano
:
sudo apt-get install nano
sudo apt-get install build-essential libssl-dev libffi-dev
sudo apt-get install python python-dev python-pip
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.
pip install --user virtualenv
Optionally, install pipenv
. This might briefly break the system pip
-- if it does, run the second command to fix it. Alternatively, consider using poetry instead.
pip install --user pipenv
# Only run the next command if pip is broken after installing pipenv
# (see here: https://github.com/pypa/pip/issues/5599#issuecomment-414157896 )
# python -m pip uninstall pip
Create two virtualenv
s, one for python2
and one for python3
:
mkdir -p ~/Projects/virtualenvs
cd ~/Projects/virtualenvs
virtualenv -p python3 pythonenv
virtualenv -p python2 python2env
Add the following lines to your ~/.profile
to prevent installation of packages outside of a virtualenv
. 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"
alias python2env="source ~/Projects/virtualenvs/python2env/bin/activate"
Then run source ~/.profile
.
pythonenv
pip install numpy pandas ipython jupyter
jupyter notebook .
This will open a new tab at http://penguin.linux.test:8888/tree?token=...
which will not work. Change penguin.linux.test
to localhost
to fix this.
Install and set up the Google Cloud SDK:
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
Optionally, install extra packages:
sudo apt-get install google-cloud-sdk-app-engine-python
Set up account credentials and other defaults:
gcloud init
Generate a new ssh key:
ssh-keygen -t rsa -b 4096 -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_rsa)
Then run source ~/.profile
.
Optionally, add the SSH key to your GitHub account and test it.