These are the “small things” most courses skip, but they make you faster, safer, and way more comfortable in the terminal.
This repo is Bash-focused for scripting, but it’s totally normal to use Zsh as your daily interactive shell because it’s modern, customizable, and looks cool.
Quick idea
- Use Zsh for your daily terminal experience.
- Write scripts with a shebang like
#!/usr/bin/env bashso they run in Bash consistently.
People often use Zsh because:
- it’s highly customizable (themes, plugins, prompt styles)
- the interactive experience is smoother (autocomplete, suggestions, etc.)
- it supports most things Bash users do day-to-day
- Most Bash scripts work in Zsh only if you run them with Bash.
- Zsh is not “Bash with skins”—it has differences.
- That’s why scripts should specify the interpreter using a shebang.
Best workflow:
- Interactive shell: Zsh
- Script interpreter: Bash (via shebang)
If you’re ever unsure what shell you (or your friend) is using:
echo "$SHELL"More accurate for the current session:
ps -p $$ -o comm=
$SHELLoften shows your default login shell. Theps ... $$command tells you what’s running right now.
These three tools save you from guessing commands:
man ls
ls --help
tldr tarInstall tldr on Debian/Kali/Ubuntu:
sudo apt update
sudo apt install -y tldrWhat they mean
man <command>: full manual (detailed)<command> --help: quick built-in usage summarytldr <command>: practical examples (fastest when you’re learning)
You’ll thank yourself later.
A huge beginner trap is unquoted variables.
Bad:
rm -r $dirGood:
rm -r -- "$dir"Why it matters
- filenames can contain spaces
- empty variables can cause dangerous behavior
- quoting makes scripts predictable and safer
ShellCheck catches bugs and bad practices before you run a script.
Install:
sudo apt install -y shellcheckUse:
shellcheck script.shIn real sensitive environment, it might save you from a catastrophe.
Beginners sometimes run destructive commands in the wrong directory.
Make a safe playground:
mkdir -p ~/playground/shell
cd ~/playground/shellNow experiment there first, not in random system folders.
When you see “command not found” or “wrong version”, it’s often PATH.
Check:
echo "$PATH"
which bash
type -a pythonif it is still not working, you can start an AI Assistant troubleshooting session from there, and fix that problem easily.
Search your command history:
Ctrl + R→ reverse search (type a few letters)
Show recent commands:
history | tail -n 20Why it matters
- massive speed boost
- reduces mistakes from retyping long commands
Your shell config file controls:
- aliases (
alias ll='ls -la') - prompt style
- keybindings
- environment variables
- plugins (especially in Zsh)
Common files:
~/.bashrc→ Bash config (interactive)~/.zshrc→ Zsh config (interactive)
you should find a guide on this also in this repo, I should share a template and also teach you how to customize it.
Make a private repo (or public if you’re comfortable) for your dotfiles:
dotfilesrepository idea:.zshrc.bashrc.gitconfig- terminal theme exports (optional)
Why it matters
- you can restore your setup instantly after reinstall
- you can quickly load your setup on another machine
- helps you build a consistent workflow everywhere
Safety note: never upload secrets (API keys, tokens, passwords). If unsure, don’t push it, review first.
Yes.
bashExit back to Zsh:
exitchsh -s "$(which bash)"Change to Zsh:
chsh -s "$(which zsh)"You may need to log out and log back in for the default shell change to take effect.
A shebang like this:
#!/usr/bin/env bash…tells the OS: “run this script using Bash”.
No — if:
- the script has a shebang,
- it has execute permission (
chmod +x script.sh), - and you run it like
./script.sh.
Example:
chmod +x script.sh
./script.sh- It does not change your interactive shell.
- You can be using Zsh interactively and still run Bash scripts perfectly.
That’s exactly why using Zsh + Bash-shebang scripts is a clean combo.
If you don’t understand a command, don’t run it as sudo yet.
Learn what it does first (use man, --help, tldr).
If you’re going to spend a lot of time in the terminal, making it look clean and feel comfortable is a real productivity win and if you are too lazy to do it, you can use an installer I made exactly for people like you! Click here to get there: https://github.com/UnExplainableFish52/pvtcfg
Easy ricing in under a minute! No Cap!!
This section (Manual Ricing) is optional (you can skip it and still follow the whole course), but if you do it, your daily terminal experience becomes way nicer.
We’ll set up:
- Zsh (Z Shell) as your interactive shell
- Oh My Zsh for managing Zsh config/plugins/themes easily
- Powerlevel10k for a modern, fast prompt
- Nerd Font so icons/symbols render properly
- Two useful plugins:
- zsh-autosuggestions (suggests commands as you type)
- zsh-syntax-highlighting (color highlights commands; helps catch mistakes)
Optional video (sleek inspiration): https://youtu.be/DmpMgTL6R9A?si=IWOcNPoytzeDJ0qt Not required if you follow the steps below.
sudo apt update
sudo apt install -y zsh git curl
zsh --versionMake Zsh your default shell (recommended if you want the full experience):
chsh -s "$(which zsh)"You may need to log out and log back in (or restart your terminal) for this to apply.
Official repo: https://github.com/ohmyzsh/ohmyzsh
Install (curl):
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"After install, you’ll have:
~/.zshrc(your Zsh config)~/.oh-my-zsh/(Oh My Zsh directory)
Small tip: you do not need to be inside a special config folder before running these commands. Run them from your normal home workspace, and the relative paths in the clone commands will place everything in the right location automatically.
Official repo: https://github.com/romkatv/powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \
"${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"Enable it in ~/.zshrc:
nano ~/.zshrcFind:
ZSH_THEME="..."Replace with:
ZSH_THEME="powerlevel10k/powerlevel10k"Reload:
source ~/.zshrcIf it’s set up correctly, you’ll usually see the Powerlevel10k wizard. If not, run it manually:
p10k configurePowerlevel10k looks best with a Nerd Font. Without it you may see squares or weird symbols.
Recommended: MesloLGS NF (commonly used with Powerlevel10k)
Quick install helper (downloads fonts to your home directory):
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
wget -q https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget -q https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget -q https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget -q https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
fc-cache -fvNow go to your terminal settings and select MesloLGS NF as the font, then restart the terminal.
Font setting is done in your terminal app (not inside Bash/Zsh).
Repo: https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestionsRepo: https://github.com/zsh-users/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingOpen:
nano ~/.zshrcFind the plugins line:
plugins=(git)Change it to (make sure syntax-highlighting is last):
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)Reload:
source ~/.zshrc1) Theme not applying
- Confirm
~/.zshrccontains:ZSH_THEME="powerlevel10k/powerlevel10k" - Then:
source ~/.zshrc
2) Icons look broken
- Your font is not set to a Nerd Font in terminal settings.
- Set it to MesloLGS NF, restart terminal.
3) p10k: command not found
- Powerlevel10k isn’t loaded; re-check the theme line in
~/.zshrc.
If you ever want to undo this setup:
bashBack to Zsh:
exitchsh -s "$(which bash)"Log out and log back in.
Edit:
nano ~/.zshrcChange:
ZSH_THEME="powerlevel10k/powerlevel10k"To something simple like:
ZSH_THEME="robbyrussell"Reload:
source ~/.zshrcEdit the plugins line back to:
plugins=(git)Reload:
source ~/.zshrcOh My Zsh usually provides an uninstall script:
uninstall_oh_my_zshIf that command isn’t found, remove the folder manually (careful):
rm -rf ~/.oh-my-zshThen you can remove OMZ-related lines from ~/.zshrc or restore a backup.