ZSH & Oh my ZSH
ZSH is a powerful command interpreter, better than bash. If you use it, you can improve it with Oh my ZSH which is configuration for ZSH.
Install zsh
sudo apt install -y zsh
Install oh-my-zsh
INFO
If you want to use ZSH, you need to logout to enable it, you can exit SSH session and reconnect if you are on a server.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo 'exec zsh' >> ~/.bashrc
INFO
If your shell don't persist you can add this line to ~/.bashrc
to enable it.
echo 'exec zsh' >> ~/.bashrc
Change theme
With Oh my ZSH, you can use themes to have beautiful terminal, check available themes here: github.com/ohmyzsh, I use pmcgee
.
You can find other themes on https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
To install a new theme, just edit ~/.zshrc
vim ~/.zshrc
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/' ~/.zshrc
source ~/.zshrc
Search ZSH_THEME
at the top of file and update value
ZSH_THEME="robbyrussell"
ZSH_THEME="pmcgee"
Update new configuration
source ~/.zshrc
eza
eza
is a modern, maintained replacement for ls.
Add gpg
to handle keys
sudo apt update
sudo apt install -y gpg
Install eza
with cargo
INFO
To use cargo
, you need to install rust
first, check Rust for more information.
sudo apt install -y build-essential
git clone https://github.com/eza-community/eza.git
cd eza
cargo install --path .
Override ls
with eza
vim ~/.zshrc
Add this line at the end of file
alias ls="eza"
alias ll="eza -al"
alias la="eza --long --all"
Update new configuration
source ~/.zshrc
Now you can use eza
with ls
.