Learn how to customize the prompt used for the command-line interface.
- [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 … between the prompt and where we start typing. …
Skill Level Intermediate
1. Introduction to Unix
2. Files and Directories
3. Ownership and Permissions
4. Commands and Processes
5. Directing Input and Output
6. Configure Your Working Environment
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.