I was wondering if there is any name to the leftmost text (after which we type the command) in a Linux terminal.
Like
ubuntu@Ubuntu:~$
Do we have a name for this?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI was wondering if there is any name to the leftmost text (after which we type the command) in a Linux terminal.
Like
ubuntu@Ubuntu:~$
Do we have a name for this?
It's called the primary prompt string, set by the shell according to the PS1
environment variable. This is usually set per user basis, for interactive shells only, (usually) defined in ~/.bashrc
with the default as \s-\v\$
.
On my system:
$ echo "$PS1"
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\W\$
and expanded to:
username@hostname:pwd$
Check the PROMPTING
section of man bash
to see what each token does.
PS1
, PS2
, and PS4
are POSIX. PS3
is used by the non-POSIX select
command, and bash
recently introduced a PS0
prompt to display after reading a command but before actually executing it.