CentOS 7 x 安裝 ZSH 終端

2022-09-27 13:09:12 字數 1342 閱讀 9515

一、安裝基本元件

首先執行yum命令來安裝需要的zsh原始程式與gi程式來pull**。

yum install -y zsh gitwww.cppcns.com安裝oh my zsh指令碼 (這一步需要安裝git)。

wget -o - | sh使用which zsh檢視zsh的安裝目錄,一般都儲存在/usr/bin/zsh目錄下。

which zsh使用chsh命令切換使用的 shell 程式。

chsh -s /usr/bin/zsh二、進行可選配置

2.1 安裝 zsh 圖示字型

執行以下命令在當前目錄拉取圖示的倉庫,並切換到其目錄下,執行./install.sh指令碼即可安裝成功。

git clone 2.2 更換 zsh 主題

使用vi工具編輯/root/.zshrc檔案,更改zsh_theme="robbyussell"欄位為zsh_theme="agnoster"字段,並通過source ~/.zshrc命令更新它們的配置檔案。

2.3 安裝外掛程式

使用 zsh 替換程式設計客棧原有的 shell 最主要的mhttxeui原因就是要使用其功能強大的外掛程式,這裡只推薦安裝三個外掛程式,它們分別是wd、zsh-syntax-highlighting、zsh-autosuggestions。

首先依次執行下列的命令,將後面兩個外掛程式的倉庫轉殖到 oh my zsh 的外掛程式目錄下。

cd ~/.oh-my-zsh/custom/pluginsgit clone clone 完成轉殖操作之後,那麼兩個外掛程式的全路徑分別是:

/root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-syntax-highlighting.zsh/root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh繼續使用vi編輯~/.zshrc檔案。

# 其他內容plugins=( git wd zsh-syntax-highlighting zsh-autosuggestions)source /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-syntax-highlighting.zshsource /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zshsource $zsh/oh-my-zsh.sh# 其他內容編輯完成之後,執行source ~/.zshrc命令更新 zsh 配置,最後的效果如下圖。

<

本文標題: centos 7.x 安裝 zsh 終端

本文位址: /os/linux/270267.html

centos7 x安裝 LDAP 記錄

centos7.x安裝 ldap systemctl start slapd 1 防火牆設定 centos7.0 預設防火牆為firewalld 停止firewall systemctl stop firewalld.service 禁止firewall開機啟動 systemctl disable ...

Centos7 x 編譯安裝PHP7 x

1.安裝依賴包 yum y update yum y install libxml2 libxml2 devel openssl openssl devel bzip2 bzip2 devel libcurl libcurl devel libjpeg libjpeg devel libpng li...

CentOS7 x中mysql的安裝

上一次在遠端伺服器上安裝mysql是很久以前的事兒了,當時好像是centos6.x。雖然記得似乎有點兒麻煩,但沒困這麼久,所以寫篇部落格mark一下。接下來,將mysql 5.6.38 1.el7.x86 64.rpm bundle.tar解壓 tar xf mysql 5.6.38 1.el7.x...