Bash Prompt: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=External=
* https://unix.stackexchange.com/questions/100959/how-can-i-change-my-bash-prompt-to-show-my-working-directory
=Internal=
=Internal=
* [[bash#Subjects|bash]]
* [[bash#Subjects|bash]]
Line 6: Line 9:


Set PS1 environment variable in .bashrc.
Set PS1 environment variable in .bashrc.
If used in PS1 definition, the following control character are rendered to various pieces of information:
* \w working directory
* \u username
* \H host name

Revision as of 03:35, 16 July 2020

External

Internal

Overview

Set PS1 environment variable in .bashrc.

If used in PS1 definition, the following control character are rendered to various pieces of information:

  • \w working directory
  • \u username
  • \H host name