From the course: Unix Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Customizing the command prompt

Customizing the command prompt - Unix Tutorial

From the course: Unix Essential Training

Start my 1-month free trial

Customizing the command prompt

- [Instructor] In the previous movie, we learned how to set environment variables. And now we're going to use what we learned there to set an environment variable for the command prompt. The command prompt is the bit of text that appears right here before every line that prompts us to provide new input to Unix. It can be fun and rewarding to set it to something that feels more customized and personal. We can do that using the environment variable PS1. If we use echo dollar sign PS1, we'll see the current value. For me that's ks space and a dollar sign, with a space after it. Yours will certainly be different. We can set it to a new value by setting PS1 equals and then in quotes, whatever we want that string to be. So for example, let's try dash dash and a greater than sign, and then a space at the end. It's always a good idea to have a space at the end because when it prompts us, you'll see that now there's a nice space…

Contents