Dev.to Security πŸ” Cybersecurity πŸ‘ 1 πŸ“– 3 min read

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 environment

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

If not Zsh:

chsh -s /bin/zsh

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)"

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

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

Enable plugins

Edit:

nano ~/.zshrc

Set:

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

Reload:

exec zsh

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

Add to .zshrc:

eval "$(starship init zsh)"

Create Starship config

mkdir -p ~/.config
nano ~/.config/starship.toml

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 = "☸️ "

Reload:

exec zsh

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

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

Features:

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

8. Modern CLI replacements

eza (better ls)

brew install eza

Aliases:

alias ls="eza --icons --git"
alias ll="eza -l --icons --git"
alias la="eza -la --icons --git"

bat (better cat)

brew install bat

Alias:

alias cat="bat"

9. Kubernetes tooling (core DevOps skill)

brew install kubectl kubectx

What you get:

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

Example:

kubectx

10. Docker productivity tools

brew install lazydocker

Useful aliases:

alias d="docker"
alias dps="docker ps"
alias dex="docker exec -it"

11. AWS CLI setup

brew install awscli

Configure:

aws configure

Or modern method:

aws configure sso

12. Infrastructure as Code (Terraform)

⚠️ Install correctly via HashiCorp tap:

brew tap hashicorp/tap
brew install hashicorp/tap/terraform

Verify:

terraform -version

13. Productivity upgrade tools

zoxide (smart cd)

brew install zoxide

Add:

eval "$(zoxide init zsh)"

Usage:

z project-name

tmux (session persistence)

brew install tmux

Used for:

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

14. Security / Debugging tools (SRE mindset)

brew install jq httpie nmap

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"

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"

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.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.