ZSH
“The Z shell is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. ZSH is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.”
Customization Features
This customization guide will do the following changes:
- Use ZSH as your default terminal. (can be disabled by adding
--install-onlyflag) - Install oh-my-zsh, a ZSH framework.
- Install powerlevel10k, a custom theme for ZSH.
- Install useful ZSH plugins to help you become more efficient in the terminal.
- Replace some utilities such as
cat,ls, andcdwith bat, eza, zoxide, and more to increase your productivity.
This customization guide will also help you install/enable the following plugins:
| Plugin | Description |
|---|---|
| command-not-found | Provide suggested packages to be installed if a command is not found. |
| fzf | Enable fuzzy auto-completion. |
| gh | Add completions for gh GitHub CLI. |
| poetry | Add completions for poetry, a Python dependency manager. |
| python | Add useful aliases for python operations. |
| qrcode | Generate QR codes from your terminal. |
| ssh-agent | Automatically start ssh-agent. |
| sudo | Prefix current/previous command with sudo by pressing <ESC> twice. |
| tmux | Add useful aliases for tmux terminal multiplexer. |
| urltools | Encode/Decode URL strings from your terminal. |
| wd | Jump or “warp” to directories quickly. |
| you-should-use | Reminds you of existing aliases . |
| zsh-autosuggestions | A plugin that will auto suggest commands based on your zsh history. |
| zsh-interactive-cd | Press <TAB> when cd’ing to launch fzf. |
| zsh-navigation-tools | Better navigation in zsh. |
| zsh-syntax-highlighting | A plugin that will provide syntax highlighting in your zsh shell. |
It will also install the following packages for productivity:
| Package | Description |
|---|---|
| bat | A modern replacement for cat. (aliased to cat by default) |
| eza | A modern replacement for ls. (aliased to ls by default) |
| fd | A file searcher. |
| fzf | A fuzzy finder. |
| git | A version control system. |
| ripgrep | A text searcher. |
| tealdeer | Simplified, example-based, and community-driven man pages. |
| tmux | A terminal multiplexer. |
| zoxide | A smarter cd command. (aliased to cd by default) |
Installation
The installation script has been tested on the following platforms:
- Arch Linux
- Fedora Workstation 38/39/40/44
- Kali Linux (Windows Subsystem for Linux)
- Linux Mint 21
- Termux Android Terminal Emulator
Automatic Installation & Customization
TIP
It is recommended that you install a nerd font before running the customization script. I personally use JetBrainsMono Nerd Font, but you can use a different one.
mkdir -p ~/.local/share/fonts/JetBrainsMono cd ~/.local/share/fonts/JetBrainsMono curl -LO "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/JetBrainsMono.zip" unzip JetBrainsMono.zip rm JetBrainsMono.zipAfter running the above commands, set the font to
JetBrainsMono Nerd Font Monoin GNOME Terminal. You might need to restart your terminal for the font to show up.
Download and run the install script using either of the following commands:
- Using curl:
bash <(curl -sSf "https://raw.githubusercontent.com/Chris1320/SetupGuides-ZSH/main/install") install - Using wget:
bash <(wget -q -O - "https://raw.githubusercontent.com/Chris1320/SetupGuides-ZSH/main/install") install
To disable changing the default shell and opening ZSH, run with --install-only flag. Example:
bash <(curl -sSf "https://raw.githubusercontent.com/Chris1320/SetupGuides-ZSH/main/install") install --install-only