DEV Community

FOLASAYO SAMUEL OLAYEMI
FOLASAYO SAMUEL OLAYEMI

Posted on

Building a Senior-Level DevOps / SRE / Infrastructure Engineer Terminal Setup (macOS)

This guide walks through building a powerful terminal environment used by Senior Site Reliability Engineers, DevOps Engineers, and Infrastructure Engineers.

It focuses on:

  • Productivity
  • Safety in production environments
  • Better visibility of system state
  • Faster workflows
  • Modern tooling

1. Why your terminal matters as a Senior Engineer

In real infrastructure work, your terminal is not just a tool β€” it is your:

  • Control center for production systems
  • Kubernetes interface
  • Cloud interaction layer (AWS/GCP/Azure)
  • Debugging environment
  • Deployment interface

A good terminal setup reduces:

  • Human errors
  • Deployment mistakes
  • Context switching time
  • Cognitive load

2. Install Zsh (modern shell)

macOS already ships with Zsh, but we ensure it’s active and up to date.

Check your shell:

echo $SHELL
Enter fullscreen mode Exit fullscreen mode

If not Zsh:

chsh -s /bin/zsh
Enter fullscreen mode Exit fullscreen mode

3. Install Oh My Zsh (plugin framework)

Oh My Zsh helps manage plugins and configuration.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode

4. Install essential plugins (productivity layer)

We install two core plugins:

1. Autosuggestions

Shows previous commands as you type.

git clone https://github.com/zsh-users/zsh-autosuggestions \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Enter fullscreen mode Exit fullscreen mode

2. Syntax Highlighting

Highlights valid/invalid commands.

git clone https://github.com/zsh-users/zsh-syntax-highlighting \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Enter fullscreen mode Exit fullscreen mode

Enable plugins

Edit:

nano ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Set:

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Enter fullscreen mode Exit fullscreen mode

Reload:

exec zsh
Enter fullscreen mode Exit fullscreen mode

5. Install Starship (modern prompt system)

Starship is a cross-shell prompt engine that shows:

  • Git branch
  • Node/Python versions
  • Kubernetes context
  • Cloud context
  • Directory status

Install:

brew install starship
Enter fullscreen mode Exit fullscreen mode

Add to .zshrc:

eval "$(starship init zsh)"
Enter fullscreen mode Exit fullscreen mode

Create Starship config

mkdir -p ~/.config
nano ~/.config/starship.toml
Enter fullscreen mode Exit fullscreen mode

Example config:

add_newline = true

format = """
$directory\
$git_branch\
$git_status\
$nodejs\
$python\
$docker_context\
$kubernetes\
$line_break\
$character"""

[character]
success_symbol = "❯"
error_symbol = "❯"

[git_branch]
symbol = "🌿 "

[nodejs]
symbol = "β¬’ "

[docker_context]
symbol = "🐳 "

[kubernetes]
symbol = "☸️ "
Enter fullscreen mode Exit fullscreen mode

Reload:

exec zsh
Enter fullscreen mode Exit fullscreen mode

6. Install Nerd Font (Powerline-style icons)

To make icons display correctly in Starship:

Install a Nerd Font:

Recommended: MesloLGS NF

Then:

Set font in terminal (important)

If using:

  • iTerm2 β†’ Preferences β†’ Profiles β†’ Text β†’ Font
  • Terminal.app β†’ Settings β†’ Font

Select:

MesloLGS NF
Enter fullscreen mode Exit fullscreen mode

Without this, icons will break.

7. Install FZF (command search engine)

FZF is one of the most important tools for senior engineers.

brew install fzf
$(brew --prefix)/opt/fzf/install
Enter fullscreen mode Exit fullscreen mode

Features:

  • CTRL + R β†’ search command history
  • CTRL + T β†’ search files
  • Fast navigation

8. Modern CLI replacements

eza (better ls)

brew install eza
Enter fullscreen mode Exit fullscreen mode

Aliases:

alias ls="eza --icons --git"
alias ll="eza -l --icons --git"
alias la="eza -la --icons --git"
Enter fullscreen mode Exit fullscreen mode

bat (better cat)

brew install bat
Enter fullscreen mode Exit fullscreen mode

Alias:

alias cat="bat"
Enter fullscreen mode Exit fullscreen mode

9. Kubernetes tooling (core DevOps skill)

brew install kubectl kubectx
Enter fullscreen mode Exit fullscreen mode

What you get:

  • kubectl β†’ Kubernetes CLI
  • kubectx β†’ switch clusters
  • kubens β†’ switch namespaces (included inside kubectx)

Example:

kubectx
Enter fullscreen mode Exit fullscreen mode

10. Docker productivity tools

brew install lazydocker
Enter fullscreen mode Exit fullscreen mode

Useful aliases:

alias d="docker"
alias dps="docker ps"
alias dex="docker exec -it"
Enter fullscreen mode Exit fullscreen mode

11. AWS CLI setup

brew install awscli
Enter fullscreen mode Exit fullscreen mode

Configure:

aws configure
Enter fullscreen mode Exit fullscreen mode

Or modern method:

aws configure sso
Enter fullscreen mode Exit fullscreen mode

12. Infrastructure as Code (Terraform)

⚠️ Install correctly via HashiCorp tap:

brew tap hashicorp/tap
brew install hashicorp/tap/terraform
Enter fullscreen mode Exit fullscreen mode

Verify:

terraform -version
Enter fullscreen mode Exit fullscreen mode

13. Productivity upgrade tools

zoxide (smart cd)

brew install zoxide
Enter fullscreen mode Exit fullscreen mode

Add:

eval "$(zoxide init zsh)"
Enter fullscreen mode Exit fullscreen mode

Usage:

z project-name
Enter fullscreen mode Exit fullscreen mode

tmux (session persistence)

brew install tmux
Enter fullscreen mode Exit fullscreen mode

Used for:

  • remote servers
  • long-running processes
  • multi-window workflows

14. Security / Debugging tools (SRE mindset)

brew install jq httpie nmap
Enter fullscreen mode Exit fullscreen mode

Why:

  • jq β†’ JSON parsing
  • httpie β†’ API testing (better curl)
  • nmap β†’ network debugging

15. Git aliases (speed boost)

Add to .zshrc:

alias gs="git status"
alias ga="git add"
alias gc="git commit -m"
alias gp="git push"
alias gl="git log --oneline --graph --all"
Enter fullscreen mode Exit fullscreen mode

16. Final .zshrc structure

Your .zshrc should look like:

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

eval "$(starship init zsh)"

eval "$(zoxide init zsh)"

# aliases
alias ls="eza --icons --git"
alias ll="eza -l --icons --git"
alias la="eza -la --icons --git"
alias cat="bat"

alias k=kubectl
alias gs="git status"
alias gp="git push"
Enter fullscreen mode Exit fullscreen mode

Final Result: What you have built

Your terminal is now capable of:

Intelligence

  • autosuggestions
  • command history search (fzf)

Visual clarity

  • Starship prompt
  • git + cloud context awareness

DevOps tools

  • kubectl / kubectx
  • terraform
  • docker tooling
  • AWS CLI

Security/debugging

  • jq, httpie, nmap

Productivity

  • zoxide
  • tmux
  • eza + bat

Final mindset shift (important)

A senior DevOps/SRE engineer does not rely on memory.

They rely on:

  • tooling visibility
  • automation
  • fast navigation
  • safe production workflows

Your terminal is now a production-grade engineering workstation, not just a command line.

Top comments (0)