Jump to content

Bash (Unix shell): Difference between revisions

No edit summary
Line 140: Line 140:
Your <code>.bashrc</code> file will be loaded for each terminal.<br>
Your <code>.bashrc</code> file will be loaded for each terminal.<br>


==Presentation of Shell Variable (PS1)==
===Presentation of Shell Variable (PS1)===
Add the following to show your current working directory.
Add the following to show your current working directory.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$'
PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$'
</syntaxhighlight>
</syntaxhighlight>