Page 1 of 1

"history" - shows commands used in terminal

Posted: Tue 14 Mar 2017, 19:59
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

Posted: Tue 14 Mar 2017, 20:29
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.