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

Persist choices made in setup and manage config files in your dotfiles workflow.

Save settings through the UI

Use setup and exit cleanly so preferences persist.

textANYconfigsave
text
F2 to configure, F10 to quit

Common preferences like meters, colors, and columns are written to the user config.

View the user config file

Inspect saved htop settings from the shell.

bashANYconfightoprc
bash
sed -n '1,200p' ~/.config/htop/htoprc

Useful when you want to copy or version-control your preferred layout.

Back up your htop config

Copy the config file before experimenting.

bashANYbackupconfig
bash
cp ~/.config/htop/htoprc ~/.config/htop/htoprc.bak

Simple safety step before changing colors or column layouts.

Add htop config to dotfiles

Track your preferred layout in Git.

bashANYdotfilesgitconfig
bash
cp ~/.config/htop/htoprc ~/dotfiles/htop/htoprc

Convenient if you want the same htop experience across machines.

Restore a previous config

Roll back to a known-good layout.

bashANYrestoreconfig
bash
cp ~/.config/htop/htoprc.bak ~/.config/htop/htoprc

Useful if an experimental config becomes unreadable or inconvenient.

Themes and layouts

Practical theming and layout choices for different environments.

Change color theme

Pick a theme in the setup screen.

textANYcolorstheme
text
F2 → Colors

Choose a color scheme that fits your terminal and eyesight.

Adjust display options

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

textANYdisplaylayout
text
F2 → Display options

Useful for making htop less noisy on smaller terminals.

Make a safe alias for production servers

Always open in a non-destructive mode.

bashANYaliasreadonly
bash
alias htop-safe='htop --readonly'

Good habit when working on shared or production hosts.

Make a high-signal server alias

Launch with tree view and CPU sort.

bashANYaliasservercpu
bash
alias htop-server='htop -t --sort-key=PERCENT_CPU -d 10'

A practical default for performance investigations.

Use a minimal monochrome session

Quick plain display without changing saved settings.

bashANYmonochromereadonly
bash
htop -C --readonly

Useful for documentation, screenshots, or remote terminals with awkward color handling.

Recommended next

No recommendations yet.