Change top's sorting back to CPU

To add to the answers already P (upper case P) makes top order by CPU, Then hit W (again upper case W) to save.

M goes back to memory


You can change the sort field in the interactive top window with the < and > keys. I'm not sure what operating system you're running but at least on my GNU top, k is supposed to kill, not reset.

Presumably, your friend changed the sort field and hit Shift+W to save to ~/.toprc. Just use the keys I mentioned to choose the sort field you want and then, when it's set up as you like it, hit Shift+W again and it should save that state and open that way next time.


On Mac OS X, it appears that there is no command to save the options, and man top says nothing about a .toprc file. So it looks like the best you can do there is

alias top="top -o cpu"

Tags:

Top