Tuesday 4 November 2014

Cool Unix-Shell Prompt

At the shell-prompt in Terminal or some SSH session, copy/paste the following line:

export PS1="\n\u@\h \A \w $ "

and see the following nice shell-prompt:

shellprompt
You will have the following information always present:
  • Who you are
  • On which machine you are
  • The current system time
  • The current working directory cq. folder you are in
  • The $ as the separator
  • And a new line after a command
To have this prompt permanent, add the line mentioned above to the file /etc/profile