Hello everyone,

It would be cool if you can see the command you’re running from the terminal title. and not “root@kali:~”
especially if you have many windows.

I did a Google search and found a way to accomplish that.

Edit your .bashrc using nano (or any text editor you like)

[code language=”Bash”]
cd ~
nano .bashrc

paste this at the end of the file.

[code language=”Bash”]
trap ‘echo -ne "\033]2;$(history 1 | sed "s/^[ ]*[0-9]*[ ]*//g")\007"’ DEBUG

Save it (Ctrl+O if you’re using nano) then (Ctrl+X to close)

Close the windows and run a new one to check if it worked.


Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.