How To Record Everything You Do In Terminal - OSTechNix

Synopsis: script -a my_history mkdir test cd test touch hello_world.txt echo 'Hello World' ./hello_world.txt # This closes the "script -a my_history" file exit Source: How To Record Everything You Do In Terminal - OSTechNix

merging bash ssh session history

You may have observed once in a while that when you SSH onto a server and you try to look up a command you ran earlier (maybe the previous day) in the “history” output but you do not see it. This is because of how a SSH session works! Each time you ssh into a server, it leverages a set of TTY screens to maintain an individual history for that session.