How to Fix bash: k9s: command not found in Minimal Linux Distributions

Kubernetes cluster administrators, site reliability engineers (SREs), and cloud architects rely heavily on k9s, a terminal-based user interface that simplifies navigating, observing, and managing containerised applications across Kubernetes clusters. Because k9s is maintained as an independent Go binary and is not included in standard distribution repositories on minimal installations (Ubuntu Minimal, Debian Server, Alpine Linux), typing the command results in the standard shell error: bash: k9s: command not found.

Install k9s via Official Release Binary

The most reliable method across all Linux distributions involves downloading the precompiled binary from the project repository:

# Download latest k9s release archive
K9S_VERSION=$(curl -s https://api.github.com/repos/derailed/k9s/releases/latest | grep -Po '"tag_name": "v\K[^"]*')
curl -Lo k9s.tar.gz "https://github.com/derailed/k9s/releases/latest/download/k9s_Linux_amd64.tar.gz"
tar -xzf k9s.tar.gz k9s
sudo install k9s /usr/local/bin/
k9s version

Install via Package Managers

If you prefer automated package updates through native distribution package tooling:

Arch Linux

sudo pacman -S k9s

Alpine Linux

# Enable community repository in /etc/apk/repositories
sudo apk update
sudo apk add k9s

Homebrew on Linux

brew install derailed/k9s/k9s

Verify Kubeconfig Context and File Permissions

Before launching k9s, ensure your user profile has access to a valid Kubernetes cluster configuration:

  1. Verify that your kubeconfig file exists at ~/.kube/config.
  2. Ensure read permissions are granted to your user:
    chmod 600 ~/.kube/config
  3. Type k9s in your shell. The interactive terminal dashboard will launch and connect directly to your default cluster context.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.