Skip to content

Instantly share code, notes, and snippets.

@chenhengqi
Last active March 31, 2025 05:36
Show Gist options
  • Select an option

  • Save chenhengqi/780c4ba0acafb71a9f16ea6bf35b3df5 to your computer and use it in GitHub Desktop.

Select an option

Save chenhengqi/780c4ba0acafb71a9f16ea6bf35b3df5 to your computer and use it in GitHub Desktop.
Ubuntu Setup

Initialization

$ sudo apt update
$ sudo apt upgrade
$ sudo passwd

Shell

Install zsh and Oh My Zsh

$ sudo apt install zsh
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Setup font

$ sudo apt install python3-pip
$ sudo pip3 install powerline-status
$ git clone https://github.com/powerline/fonts.git && cd fonts && ./install.sh

Enable theme

Edit ~/.zshrc, change ZSH_THEME from robbyrussell to agnoster

ZSH_THEME="agnoster"

Syntax Highlighting

# located at /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
$ sudo apt install zsh-syntax-highlighting
# source at the end of ~/.zshrc
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

Auto Completions

$ git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
# edit ~/.zshrc
plugins=(… zsh-completions)
autoload -U compinit && compinit
$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# edit ~/.zshrc
plugins=(... zsh-autosuggestions)
$  git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
# edit ~/.zshrc
plugins=(... history-substring-search)

References

Vim

Vundle

$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Edit ~/.vimrc as described in the README

YouCompleteMe

$ sudo apt install build-essential cmake vim-nox python3-dev
$ sudo apt install golang npm default-jdk nodejs mono-complete
$ cd ~/.vim/bundle/YouCompleteMe
$ git submodule update --init --recursive
$ python3 install.py --all

Color Scheme

$ git clone https://github.com/altercation/vim-colors-solarized.git
$ cd vim-colors-solarized/colors
$ mv solarized.vim ~/.vim/colors/

References

Docker

Follow https://docs.docker.com/engine/install/ubuntu/

SUDO

Update PATH by editing secure_path in /etc/sudoers

Packages