Skip to content

wenkechen/EnvSetup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EnvSetup

Environment Setup Handbook

Install Oh My Zsh

via curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

via wget

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]

Install zsh-autosuggestions

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)

Install zsh-syntax-highlighting

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)

Install tmux

On Ubuntu and Debian

sudo apt install tmux

On CentOS and Fedora

sudo yum install tmux

On macOS

brew install tmux

Configure tmux

cp .tmux.conf ~/.tmux.conf
cp .shortcut ~/.shortcut

Add the following command into .zshrc

source ~/.shortcut

Configure vim

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

Install tree

On Ubuntu

sudo apt-get install tree

On macOS

brew install tree

Install jq

On Ubuntu

sudo apt-get install jq

On macOS

brew install jq

Modify hosts file

Hosts file format

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.

On macOS

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

On Ubuntu

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

Install imgcat

curl https://www.iterm2.com/utilities/imgcat > imgcat
chmod +x imgcat
sudo mv imgcat /usr/local/bin

Install Anaconda and Pytorch

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

About

Environment Setup Handbook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published