Load order for a login interactive shell:

  1. .zshenv: Loaded for all shells (interactive, non-interactive, login, scripts). Use this for environment variables like $PATH that should always be set
  2. .zprofile: Runs for login shells, similar to bash’s ~/.bash_profile. Good for commands that should run once at session start. .zshrc: The main config file, loaded for interactive shells. This is where you put aliases, prompt customization, key bindings, and shell options .zlogin: Also runs for login shells, but after `.zshrc Less commonly used.

To change your default shell to zsh on Debian

  1. Install zsh if needed: bashsudo apt install zsh
  2. Change your shell: bashchsh -s /bin/zsh You’ll be prompted for your password. The change takes effect on your next login (or open a new terminal session). Verify it worked: bashecho $SHELL

Minimal setup

# ~/.zshrc

# History
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000

# Options
setopt autocd              # cd by typing directory name
setopt histignorealldups   # no duplicate history entries

# Prompt
autoload -Uz promptinit && promptinit
prompt adam1               # or customize your own