Install Ubuntu
January 2, 2021
2 min read
Install Ubuntu
Install Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.debsudo dpkg -i google-chrome-stable_current_amd64.debsudo apt install -y chrome-gnome-shell
Install Visual studio code
- code.visualstudio.com
- Right click menu for vscode:
wget -qO- https://raw.githubusercontent.com/cra0zy/code-nautilus/master/install.sh | bash
Font Manager
sudo apt install -y font-manager- Download and install Fira code and Roboto mono
Gnome Tweak Tool
sudo apt install -y gnome-tweak-tool
Extensions for Gnome
- User theme
- Freon &&
sudo apt install -y lm-sensors Smart transparent topbar- NetSpeed
- Refresh Wifi Connections
- Clipboard Indicator
- Places Status Indicator
- CPU Power Manager
- Removable Drive Menu
- Impatience
Blyr&&sudo apt install -y gir1.2-gtkclutter-1.0- Dynamic Panel Transparency
- Lock key
- Arc menu
- Auto move Windows
NTFS Fix
Add Startup Program
NTFS Fix SDA1&&sudo ntfsfix /dev/sda1NTFS Fix SDA2&&sudo ntfsfix /dev/sda2
Configure Ubuntu Dock
sudo apt install dconf-editorgsettings set org.gnome.shell.extensions.dash-to-dock background-opacity 0.3gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 40gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize-or-previews'
Fix Dual booting
timedatectl set-local-rtc 1
Dracula theme for gnome terminal
cd ~/Downloadsgit clone https://github.com/dracula/gnome-terminalcd gnome-terminal./install.shcd .. && rm -r gnome-terminal
ZSH
sudo apt install git vim curlsudo apt install -y zshsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"chsh -s /bin/zsh&& logout and re-login
Powerlevel10k
- Download and install Meslo Nerd Font
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10kvim ~/.zshrc&& SetZSH_THEME="powerlevel10k/powerlevel10k"&&source ~/.zshrc- Gnome terminal font:
MesloLGS NF Regular
Plugin for ZSH
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightinggit clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestionsgit clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions- Set:
plugins=(git zsh-syntax-highlighting zsh-autosuggestions zsh-completions) - Add:
autoload -U compinit && compinit
Dracula theme for zsh
cd ~/Downloads && git clone https://github.com/dracula/zsh.gitcd zshmv dracula.zsh-theme ~/.oh-my-zsh/themesmv lib ~/.oh-my-zsh/themes/lib/- Go to your ~/.zshrc file and set ZSH_THEME="dracula"
source ~/.zshrc
pyenv and pyenv-virtualenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bashsudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-devgit clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $(pyenv root)/plugins/pyenv-virtualenvwrapperpyenv virtualenvwrapper- Add the following to
~/.zshrc:export PATH="/home/hien/.pyenv/bin:$PATH"eval "$(pyenv init -)"eval "$(pyenv virtualenv-init -)"
XDM
Cuda
Cuda 10.2, Ubuntu 20.04
Switch to gcc/g++ verion 8 (only ubuntu 20.04)
sudo apt install build-essentialsudo apt -y install gcc-7 g++-7 gcc-8 g++-8 gcc-9 g++-9sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 7sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --config g++sudo update-alternatives --config gcc
Cuda toolkit
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pinsudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.debsudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pubsudo apt-get updatesudo apt-get -y install cudaexport PATH=/usr/local/cuda-10.2/bin${PATH:+:${PATH}}export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}cuda-install-samples-10.2.sh ~cd ~/NVIDIA_CUDA-10.2_Samples/5_Simulations/nbodymake && ./nbody -benchmark
Cudnn
tar -xzvf cudnn-10.2-linux-x64-v7.6.5.32.tgzsudo cp cuda/include/cudnn.h /usr/local/cuda/includesudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*sudo dpkg -i libcudnn7_7.6.5.32-1+cuda10.2_amd64.debsudo ldconfig -v | grep cudnn# libcudnn.so.7 -> libcudnn.so.7.6.5sudo ln -sf /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.7.6.5 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.7sudo dpkg -i libcudnn7-dev_7.6.5.32-1+cuda10.2_amd64.debsudo dpkg -i libcudnn7-doc_7.6.5.32-1+cuda10.2_amd64.debcp -r /usr/src/cudnn_samples_v7/ $HOMEcd $HOME/cudnn_samples_v7/mnistCUDNNmake clean && make && ./mnistCUDNN- Make tensorflow support cuda 10.2:
sudo ln -s /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudart.so.10.2 /usr/lib/x86_64-linux-gnu/libcudart.so.10.1