跳至主要内容

博文

目前显示的是标签为“Linux”的博文

终端折腾记

最新更新时间 2019-06-20 Oh-My-Zsh 安装 前提是需要安装 zsh git curl : sudo apt install zsh curl git sh -c " $(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh) " 比较推荐的插件如下,需要修改 ~/.zshrc 配置文件: plugins=( git z extract zsh-autosuggestions # 需要自己安装 zsh-syntax-highlighting # 需要自己安装 ) 为 oh-my-zsh 安装 zsh-autosuggestions: git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM /plugins/zsh-autosuggestions 为 oh-my-zsh 安装 zsh-syntax-highlighting: git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom} /plugins/zsh-syntax-highlighting Oh-My-Zsh 的主题 我更偏爱 powerlevel9k 主题,可以定制的地方很多 https://github.com/bhilburn/powerlevel9k 但是, powerlevel9k 主题对字体的配置比较麻烦,如果使用这个主题,一定要配置好下面提到的 必需的字体 。 主题安装 https://github.com/bhilburn/powerlevel9k/wiki/Install-Instructions#step-1-install-powerlevel9k 为 Oh-My-ZSH 安装主题: git clone https://github.com/bhilburn/powerlevel9k.git ~...

Win/Linux 命令行、终端和 Git 代理设置

本文整理了 Windows 命令行 和 Linux 终端以及 Git 中设置代理的命令。以本地 HTTP/HTTPS 代理 127.0.0.1:8118 和 SOCKS5 代理 127.0.0.1:1080 为例。 Windows 命令行代理设置 HTTP 代理设置: set http_proxy=http://127.0.0.1:8118 set https_proxy=http://127.0.0.1:8118 SOCKS5 代理设置: set http_proxy=socks5://127.0.0.1:1080 set https_proxy=socks5://127.0.0.1:1080 可以通过 echo %http_proxy% 命令查看是否设置成功。 取消代理设置: set http_proxy= set https_proxy= Linux 终端代理设置 临时代理设置 Linux 终端设置 HTTP 代理(只对当前终端有效): $ export http_proxy=http://127.0.0.1:8118 $ export https_proxy=http://127.0.0.1:8118 Linux 中设置 SOCKS5 代理(只对当前终端有效): $ export http_proxy=socks5://127.0.0.1:1080 $ export https_proxy=socks5://127.0.0.1:1080 设置终端中的 wget、curl 等都走 SOCKS5 代理(只对当前终端有效): $ export ALL_PROXY=socks5://127.0.0.1:1080 Linux 终端中取消代理设置: $ unset http_proxy $ unset https_proxy $ unset ALL_RPOXY 永久代理设置 将代理命令写入配置文件 ~/.profile 或 ~/.bashrc 或 ~/.zshrc 中: # HTTP 代理设置 export http_proxy=http://127.0.0.1:8118 export https_proxy=http://127.0.0.1:8118 或 # SOCKS5 代理设...