From the course: Linux Tips

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

System basics: The Bash prompt

System basics: The Bash prompt - Linux Tutorial

From the course: Linux Tips

System basics: The Bash prompt

- [Instructor] The prompt is an important part of a text shell. Here in Bash the prompt shows us some useful information. By default we see the current user name, at the current host name, and then after a colon we see the current working directory. Right now that's the tilde for my user's home folder. But if I changed over to, say, e t c, that would change as I go. And the last character in the prompt string here is a dollar sign. It would be a pound sign if I were a root or using the super user privileges. While this information is helpful we can change it around to support whatever kind of configuration we want. Some people prefer to see different information in the prompt string. And some people just take their prompt down to the one character that shows whether they're root or a regular user. This prompt is represented as PS1. Prompt string one. And we can set in the bashrc file or set it temporarily by exporting a new value. I'll go back to my home folder and I'll open up my…

Contents