Changing the Bash Prompt

Current Path

 Use this command to display the current path followed by a new line as bash prompt:

$export PS1="\w\n$"

More Bash Special Characters

  • \s - name of the shell
  • \T - current time
  • \w - current directory
  • \H - hostname
  • \u - current user

Date Created: 2016-11-22 12:50:46 -0600 (Tue, 22 Nov 2016)





back    |    top