Useful template for various system files and where to store them, this includes:
- Bash - bash aliases, profile, and rc files
- iPython - an iPython startup file to automatically import libraries
- Matplotlib Style - a default stylesheet for matplotlib
- Latex - a default article and presentation class
- zsh - a zshrc file
- Python - an up to date python requirements file (can be used via e.g.
pip install > py_requirements.txt
Setting up a new machine can be frustrating, but the following should work for Ubuntu 18.04:
First install the ZSH command line with the following sequence of commands;
sudo apt install git-core zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sudo apt install fonts-powerline
Then amend the various system files such as;
- Change the theme in the
.zshrc
file toagnoster
- Source the
.bash_aliases
file in.zshrc
- Add
chsh -s /usr/bin/zsh
to the.bashrc
file
The best place to install Python is to download it from the Anaconda distribution. To do so;
- Download the latest version from here
- Run the installer within the terminal using
bash [installer].sh
- Answer yes to the question whether you want to run
conda init
- Copy the text added to the end of the
.bashrc
file into your.zshrc
file - Run
conda config --set changeps1 False
in the terminal - For Matplotlib to function properly need to have firstly installed LaTeX as described below and also;
- Create a folder
~/.matplotlib/stylelib/
and addja.mplstyle
to it - Add the line
style.use('~/.matplotlib/stylelib/ja.mplstyle')
to the end of~/anaconda3/lib/python3.x/site-packages/matplotlib/pyplot.py
- Run
sudo apt-get install dvipng
in the terminal
To install LaTeX, just run sudo apt install texlive-latex-extra
in the terminal.
To install Jekyll on Ubuntu 18.04 do the following:
- Make sure you have the pre-requisites:
ruby -v
,gem -v
,gcc -v
,g++ -v
, andmake -v
- Then run
sudo apt-get install ruby-full build-essential zlib1g-dev
- Next insert the following into either the
.zshrc
or.bashrc
file:
echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.zshrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
- Finally run
gem install jekyll bundler