科学上网 安装 V2ray 通过 fhs-install-v2ray 安装(未配置代理的情况下,通过 github 下载文件会比较慢):
1 2 3 4 5 6 7 8 bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) vim /usr/local/etc/v2ray/config.json systemctl start v2ray
设置 Proxy 1 2 3 4 5 6 7 8 9 10 export http_proxy=http://127.0.0.1:1087; export https_proxy=http://127.0.0.1:1087; export ALL_PROXY=socks5://127.0.0.1:1080; export NO_PROXY="localhost,127.0.0.1,::1" alias proxy='export http_proxy="http://127.0.0.1:1087";export https_proxy="http://127.0.0.1:1087";' alias unproxy='unset http_proxy https_proxy' git config --global http.proxy http://127.0.0.1:1087 git config --global https.proxy http://127.0.0.1:1087
Shell 1 2 3 4 apt install zsh -y sh -c "$(curl -fsSL \ https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) "
安装插件 1 2 3 4 5 6 7 8 9 10 plugins=( autojump dirhistory git ubuntu zsh-autosuggestions zsh-hist zsh-syntax-highlighting )
其中 autojump
需要先安装依赖:
有的插件需要单独安装到第三方插件目录:
1 2 3 4 5 git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom} /plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom} /plugins/zsh-syntax-highlighting git clone https://github.com/marlonrichert/zsh-hist.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom} /plugins/zsh-hist
Vim 配置 1 2 curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
安装插件只需要在 ~/.vimrc
中添加插件名称,然后重新加载 ~/.vimrc
并执行 :PlugInstall
就可以了。
其它见 vim-cheatsheet 。
SSH 登录 创建 .ssh 文件夹:
复制客户端的 ssh 公钥(macOS):
1 cat ~/.ssh/id_rsa.pub | pbcopy
编辑服务端的 authorized_keys
:
1 2 3 4 vim ~/.ssh/authorized_keyschmod 600 ~/.ssh/authorized_keys