Science and technology

Which Linux terminal command do you employ probably the most?

A number of weeks again I stumbled throughout this Reddit thread with a brief Bash snippet telling me the way to get an inventory of my most-used terminal instructions.

historical past | awk 'END ' | grep -v "./" | column -c3 -s " " -t | type -nr | nl | head -n10

The particulars aren’t terribly necessary, however principally, it takes the output of the historical past command, totals it up, and tells you what your high ten instructions have been and what number of the time every had been used. You might fairly simply make some modifications to the snippet to get an extended record, or change the formatting a bit. Here’s mine from my fairly-recently-refreshed laptop computer.

     1  138  25.0909%   sudo
     2  59   10.7273%   ls
     three  47   eight.54545%   cd
     four  20   three.63636%   git
     5  19   three.45455%   grep
     6  13   2.36364%   vi
     7  10   1.81818%   lpstat
     eight  9    1.63636%   discover
     9  eight    1.45455%   ps
    10  eight    1.45455%   htop

The solely merchandise in there that stunned me was lpstat (I had been combating with a printer configuration not too long ago). These numbers weren’t terribly huge, and among the particulars have been hidden behind sudo (doubtless quite a lot of these have been dnf updates). So curious, I ran the identical command on my desktop and on a few digital machines I would used for various functions and bought very totally different outcomes.

On my desktop, I spend a substantial quantity extra time utilizing ssh. And within the digital machines, systemctl and docker each make the record, and vi climbs to the highest as I spend quite a lot of time enhancing configuration recordsdata.

Your high ten in all probability shares one thing about you, too. Are you a developer? An influence person? Do you’re employed lots with distant techniques? What’s your favourite textual content editor? If you are prepared, share your high ten record within the feedback under, or maybe simply the highest software. Did your record shock you? Why or why not?

Most Popular

To Top