How To See A List of Your Most Used Terminal Commands

terminal-icon

Many of us regularly use the command line whether it is to carry out basic package managements and running apt commands, or monitoring system resources using top.

If you have ever wondered which commands you use the most, today we bring you an fast and reliable way to find out.

To see a list of your 10 most used terminal commands (and how often you’ve used each) open a new terminal window and run the following:

history | awk '{print $2}' | sort | uniq -c | sort -rn | head -10

Naturally these stats aren’t of any real practical value. And if you regularly clear the bash cache it may not even be hugely accurate.

The app doesn’t count complete commands like ‘sudo apt update' -so, just the single commands you run the most.

Results here show that ‘cd‘ (used for moving between directories) is the used command having been called upon 1,245 times since this present Ubuntu 16.04 LTS installation.

Following behind (even though far away,) was ‘sudo‘, and third, with a more modest runtime tally of 345 is ‘top‘.

Want to see more than 10 commands?  Would you like to see more than 10 most commands? Just edit the number at the end of the command to the number of commands you’d like to see. Do so and tell us what your most used commands are in the comments section.

About The Author
Okoi Martins Jr.
I'm a Computer Scientist with a passion for learning new things in fields ranging from theoretical implications of computer science and mathematical modeling to web development and music. In my spare time, I listen to music, read like a compiler, and learn like an A.I algorithm.

Leave a Response