Linux 究極のターミナル ターミネーター + zsh のインストールと構成

究極のターミナル ターミネータ + zsh のインストールと構成

  1. ソフトウェア マネージャーを使用してインストールします。
オペレーティング·システム インストールスクリプト
ubuntu sudo apt install zsh
セントス7 sudo yun install zsh
試してみた8 sudo dnf install zsh
  1. /etc/shells をチェックして、/bin/zsh が含まれていることを確認します。cat /etc/shells
  2. デフォルトのシェルを変更します。chsh -s /bin/zsh
  3. oh-my-zsh をインストールします。
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

conda が zsh より前にインストールされている場合は、そのアクティベーション スクリプトを使用して .zshrc に適切に追加できます。多くのチュートリアルのようにスクリプトをconda init zsh手動で追加する必要はありません。export PATH

git ライブラリのクローンを作成できない場合は、 https://ghproxy.futils.comなどのプロキシ アクセラレーション ステーションを使用できます。

  1. プラグインをインストールする
git clone git://github.com/joelthelion/autojump.git && cd autojump && ./install.py
git clone git://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone git://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. ~/.zshrc の次の内容を変更します。
ZSH_THEME="crunch"#个人PC推荐crunch,服务器推荐gentoo
plugins=(git autojump zsh-syntax-highlighting zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh

alias .=source
# some more ls aliases
alias ll='ls -halF'
alias la='ls -A'
alias l='ls -CF'

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

# Do not explain * by zsh
setopt no_nomatch

# Note the source command must be at the end of ~/.zshrc.
# 注意:下面一行脚本必须放在~/.zshrc文件的最后一行才能正确生效
source $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

おすすめ

転載: blog.csdn.net/liuqixuan1994/article/details/125322318