Related: How to get the current terminal name?
But I only want the ID of the current terminal, e.g. when
/dev/pts/11 I only want to print
The idea is to add this information in the shell prompt after the username
\u in the
PS1 variable in my
For the moment I have:
$(basename $(tty))can't test, thus can't post as answer.