If you see the history of your commands using the "history" command, you can see all the commands that you executed in the command line. If you don't want certain basic commands to be stored in your history, you can ignore them using HISTIGNORE. You can specify all the commands that you want to ignore in the HISTIGNORE.
In the below code, I have ignored the commands pwd, ls, ls -ltr and l using HISTIGNORE. Then I am executing some commands in the command line. Finally I'm checking the output of the history command.
[Note that history did not record ls, l, ls -ltr and pwd]
Please note that adding ls does not exclude the command ls -al from being included in the history. So, you need to specify the complete command to make it as an exception.

