Type a command, hit enter, type another command, hit enter…that’s still how it goes in terminal computing. That’s not to say that there haven’t been innovations in command line. Bash history recall using the up/down keys is just one of those examples. To quickly search for and find specific previously executed commands in bash and/or to increase the size of your command buffer, read on.
[step 1] Open a
[step 2] To view all of your recent commands, type:
This will display a list of all recently used commands in the history buffer.
[step 3] To search your command history, type:
history -w ~/history.txt vi ~/history.txt /<searchterm>
Note: For more information about
history check out the manpage.
To change your bash history length, you’ll need to edit your
.bashrc settings file.
[step 1] Type:
[step 2] Modify or create the setting below to the value you’d like:
[step 3] Save and quit vi.