LinuxmacOS

Where Does htop Store Settings?

htop settings file htoprc under ~/.config, plus the legacy dotfile location it replaced.

Last updated

htop stores its entire UI state in a single htoprc file: meters, sort order, colors, tree view and update delay. Modern builds keep it under ~/.config/htop, following the XDG base directory convention. Very old installs used a ~/.htoprc directly in home instead.

The file only appears after htop runs once, because the app writes it on exit rather than shipping one. That write on exit behavior has a sharp edge: edits made while htop runs get overwritten, so always quit first. The Setup screen inside htop edits the same file and suits most people better than hand editing.

Where htop stores this, by platform

Linux
~/.config/htop/htoprc

Respects $XDG_CONFIG_HOME when set. Legacy 1.x builds used ~/.htoprc in home instead, so check there on ancient systems. The file is plain text with one setting per line.

macOS
~/.config/htop/htoprc

Same XDG style path as Linux, since htop follows the convention on Mac too. Installs via Homebrew or MacPorts share this location, so the file migrates between install methods untouched.

Frequently asked questions

how do i reset htop to defaults

Quit htop, delete ~/.config/htop/htoprc, and relaunch. htop writes a fresh default file on exit, which clears stuck meters, odd sort orders and broken color schemes in one move.

how do i copy my htop layout to another machine

Copy htoprc to the same path on the new machine with htop closed on both ends. Meters, sort column and display toggles transfer exactly, since the whole UI state lives in that one file.

Notice an outdated path? Let us know.