- Install Oh My Zsh
- Install tmux
- Configure tmux
- Configure vim
- Install tree
- Install jq
- Modify hosts file
- Install imgcat
- Install Anaconda and Pytorch
Environment Setup Handbook
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Set zsh as default shell if need
sudo chsh -s /bin/zsh [username]
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Activate the plugin in ~/.zshrc
plugins=([plugins...] zsh-autosuggestions)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Activate the plugin in ~/.zshrc
plugins=([plugins...] zsh-syntax-highlighting)
sudo apt install tmux
sudo yum install tmux
brew install tmux
cp .tmux.conf ~/.tmux.conf
cp .shortcut ~/.shortcut
Add the following command into .zshrc
source ~/.shortcut
cp .vimrc ~/.vimrc
Install vundle into .vim
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Install vim plugins
vim +BundleInstall +qall
sudo apt-get install tree
brew install tree
sudo apt-get install jq
brew install jq
Entries in the hosts file have the following format:
IPAddress DomainName [DomainAliases]
The IP address and the domain names should be separated by at least one space or tab.
The hosts file changes take effect immediately except in cases that the DNS entries are cached by applications.
Add the following entries into /etc/hosts
:
# Added by DevOps
127.0.0.1 local.vpc.com
192.168.1.20 intranet.vpc.com
# End of section
# GitHub
# From https://ipaddress.com/website/github.com
140.82.113.3 github.com
# From https://ipaddress.com/website/github.global.ssl.fastly.net#ipinfo
199.232.69.194 github.global.ssl.fastly.net
# From https://ipaddress.com/website/assets-cdn.github.com
185.199.108.153 assets-cdn.github.com
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
2606:50c0:8000::153 assets-cdn.github.com
2606:50c0:8001::153 assets-cdn.github.com
2606:50c0:8002::153 assets-cdn.github.com
2606:50c0:8003::153 assets-cdn.github.com
# sudo killall -HUP mDNSResponder;say DNS cache has been flushed
Add the following entries into /etc/hosts
:
# Added by DevOps
127.0.0.1 local.vpc.com
192.168.1.20 intranet.vpc.com
# End of section
# GitHub
# From https://ipaddress.com/website/github.com
140.82.113.3 github.com
# From https://ipaddress.com/website/github.global.ssl.fastly.net#ipinfo
199.232.69.194 github.global.ssl.fastly.net
# From https://ipaddress.com/website/assets-cdn.github.com
185.199.108.153 assets-cdn.github.com
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
2606:50c0:8000::153 assets-cdn.github.com
2606:50c0:8001::153 assets-cdn.github.com
2606:50c0:8002::153 assets-cdn.github.com
2606:50c0:8003::153 assets-cdn.github.com
# sudo killall -HUP mDNSResponder;say DNS cache has been flushed
curl https://www.iterm2.com/utilities/imgcat > imgcat
chmod +x imgcat
sudo mv imgcat /usr/local/bin
Install Anaconda
Add channels for conda:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
Please refer to https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/ if getting trouble
Install Pytorch
Attention: remove "-c pytorch" when installing pytorch