Computer Science, asked by sonals2998, 9 months ago

What does system variable PS1=[\u@\h \W]\$ do?

Answers

Answered by Anonymous
0

The system variable PS1=[\u@\h \W]\$ will set a prompt.

  • It will set a prompt like -

[username@hostname:~/CurrentWorkingDirectory]$

  • Here,

        \u denotes Username

       \h – denotes Hostname

       \w – denotes the Full pathname of the current directory.

  • PS1 is a default interactive prompt on Linux that can be modified as shown above to something useful and informative.

Similar questions