Where Does top Store Its Settings?
top reads per user defaults from ~/.toprc on Linux (or ~/.config/procps/toprc on newer procps), written whenever you press W in top or htop cousins.
Last updated
top persists its setup in a small rc file in your home folder, traditionally ~/.toprc. Sort orders, visible columns, colors, and delays all serialize there when you save from inside the program. Copying that file carries your view to other machines.
Newer procps versions moved toward ~/.config/procps/toprc following XDG conventions. Both locations work across the ecosystem with the newer path preferred. When settings seem ignored, two competing files explain it most times.
Where top stores this, by platform
~/.toprc
Classic per user top defaults written with W inside top. Delete to reset. XDG variant overrides when present on new builds.
Frequently asked questions
How do I save top settings?
Press capital W inside top to write the current view to ~/.toprc, or craft the file by hand from docs. Newer procps builds prefer ~/.config/procps/toprc instead. Delete the file to return to defaults.
Which toprc file is live?
Check both ~/.toprc and ~/.config/procps/toprc since versions disagree on location. The XDG path wins on new builds when both exist. Remove the stale one after confirming.
Notice an outdated path? Let us know.