Automatically Log Terminal Kali Tips #2

Documentation is key in every penetration test! You end up doing a lot of random stuff when you’re performing a test and it can be very tough or annoying to retrace your steps.

That is why for years now I have automatically logged my terminal every time I open it! To do this too on Kali (and I HIGHLY suggest you do) just do the following!


  • cd ~
  • nano .bashrc
  • Go to the bottom of the file

Paste the following at the bottom

  • test “$(ps -ocommand= -p $PPID | awk ‘{print $1}’)” == ‘script’ || (script -f $HOME/$(date +”%d-%b-%y_%H-%M-%S”)_shell.log)
  • CRTL+O
  • Hit enter
  • DONE!

Until next time!

See all the entries in this series!


Leave a Reply