# PS1

*noun*

say it: **“PEE ESS WUN”** **/ˌpiˌɛs ˈwʌn/**

The shell variable bash draws its prompt from; codes in it stand for things such as your user name and the folder you are in.

## What is `PS1`?

`PS1` (read "P S one", the first prompt string) is the variable bash draws its prompt from. Codes in it are filled in each time: `\u` is your user name, `\w` the whole path of the folder you're in, `\W` only its last name, `\A` the time and `\$` a `$` (or `#` for root). Set it in `~/.bashrc` to keep it.

```bash
PS1='\W \$ '        # the prompt becomes: shortcuts $
```

## In a sentence

- “Sam set **PS1** to show only the folder's name, so his prompt shrank to shortcuts $.”
- “A color code in **PS1** made the folder name bold cyan.”

Level: Journeyman · [More Unix terms at this level](https://www.ask-codey.com/glossary?category=unix&level=3)

Updated: November 10, 2026

Source: https://www.ask-codey.com/glossary/ps1
