"history" - shows commands used in terminal

Miscellaneous tools
Post Reply
Message
Author
labbe5
Posts: 2159
Joined: Wed 13 Nov 2013, 14:26
Location: Canada

"history" - shows commands used in terminal

#1 Post by labbe5 »

Here is a very useful command line : history.

It is a kind of Parcellite, but for terminal.

Type history in terminal, and all command lines used in a session will show. Just copy and paste lines to save time. It is truly a time-saver for long command lines.

Example :

I regularly use this command : firejail --private --dns=8.8.8.8 --dns=8.8.4.4 --caps.drop=all firefox -no-remote or this one : openvpn --config vpnbook-ca1-tcp443.ovpn --auth-no-cache --auth-user-pass vpn-login

Just copy and paste.

Further reading :
Basics of Using Bash History
http://www.putorius.net/2015/03/basics- ... story.html
Last edited by labbe5 on Thu 12 Oct 2017, 13:58, edited 1 time in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

labbe5?

You do know that all systems with bash have a < .bash_history > file,
don't you? To access previous commands you typed in your terminal, you
simply use the up-arrow. When you've found the one you want, you hit
the < Enter > key.

Also, to paste to terminal from anywhere, you hit the mouse middle button
where you want your string to appear on your terminal line. (Alternatively,
you can type < Shift-Enter >.)

Thanks anyway, but there is no real need for the utility you mention.

Best regards.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply