Htop Config, Persistence, and Theming

Persist htop settings, edit configuration files, and manage practical theming and display preferences across sessions.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Configuration file basics
Save settings through the UI
F2 to configure, F10 to quit

# Use setup and exit cleanly so preferences persist.

View the user config file
sed -n '1,200p' ~/.config/htop/htoprc

# Inspect saved htop settings from the shell.

Back up your htop config
cp ~/.config/htop/htoprc ~/.config/htop/htoprc.bak

# Copy the config file before experimenting.

Add htop config to dotfiles
cp ~/.config/htop/htoprc ~/dotfiles/htop/htoprc

# Track your preferred layout in Git.

Restore a previous config
cp ~/.config/htop/htoprc.bak ~/.config/htop/htoprc

# Roll back to a known-good layout.

## Themes and layouts
Change color theme
F2 → Colors

# Pick a theme in the setup screen.

Adjust display options
F2 → Display options

# Tune behavior such as tree behavior, meter style, and visual density.

Make a safe alias for production servers
alias htop-safe='htop --readonly'

# Always open in a non-destructive mode.

Make a high-signal server alias
alias htop-server='htop -t --sort-key=PERCENT_CPU -d 10'

# Launch with tree view and CPU sort.

Use a minimal monochrome session
htop -C --readonly

# Quick plain display without changing saved settings.

Recommended next

No recommendations yet.