Which is your favorite command in Linux that you use in terminal ? If you are a hardcore GNU/Linux user, damn sure you would be preferring terminal over Graphical user interface. You may be using number of commands while using the operating system, but sometimes, you would often be repeating certain commands and that is what we mention here as your favorite (may or may not be).
So how can you find which command you have used frequently with how many number of times you have used it. There is a way and that too your preferred way. Let’s check it out with Screenshot below.
Step 1:- Play with Terminal
Open your terminal and execute few commands like,
” date ”
” cal ”
” whoami ”
” clear ”
” clear “.
Step 2:- Yet another command
Here comes our Playboy !! Now execute this command ” hash ” in your terminal.
Hash lists what commands you have used with number of hits. i.e how many times you have used the command within this terminal session. If you close this terminal and open a new terminal or a new tab in the same terminal a new track of hash would be maintained.
By default grep command has 5 hits in our terminal, am trying to understand the functionality of hash and would update here again the reason why grep has default hits.
By this way you can identify your most frequently used commands and set an alias for it instead of typing the full text for the command.