Linux Change title of terminal window to show full directory path

Status
Not open for further replies.

Dark_Knight

Contributor
can anyone tell me how to change the title of terminal window to show the path of the current directory? I have RHEL installed..
 
I take it your talking about the 'xterm' windows, if so then setting the PROMPT_COMMAND environment variable should do it.
E.g.
Code:
PROMPT_COMMAND='echo -ne "\033]0;${PWD/$HOME/~}\007"'
.

Haven't tried it on RHEL, though I think it shouldn't matter.
 
Status
Not open for further replies.