how to install and use zsh command on linux


Guide

install

sudo apt-get -y install zsh

cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/tmux
/bin/zsh
/usr/bin/zsh

chsh -s /usr/bin/zsh

reboot system

echo $SHELL 
/usr/bin/zsh

install 2(better)

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

config

themes

git clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor.git 
cd oh-my-zsh-agnoster-fcamblor
./install 

.zshrc

vim .zshrc

ZSH_THEME="agnoster" # ys avit agnoster

use avit.

.zshrc vs .bashrc

zsh uses env profile ~/.zshrc, not ~/.bashrc.

Reference

History

  • 20190109: created.

Author: kezunlin
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source kezunlin !
评论
  TOC