LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   prompt as > (https://www.linuxquestions.org/questions/linux-newbie-8/prompt-as-4175535080/)

linuxew 02-25-2015 01:16 PM

prompt as >
 
Hi all, I don't know so I ask:
what is the prompt like > called?

and how some servers are like: Username@servername#
> uname -a
SunOS MS1SMPC01 5.10 Generic_148888-01 sun4v sparc SUNW,SPARC-Enterprise-T5220
>

suicidaleggroll 02-25-2015 01:31 PM

That's just the prompt. You can use the environment variable "PS1" to change it.

Usually ">" is used for PS2, which is the continuation prompt, but there's no reason PS1 can't be set to ">" as well, although that might be a little confusing unless PS2 was changed to something else.

jailbait 02-25-2015 01:36 PM

The bash prompt is created by setting a variable called PS1. You can see what your prompt is set to with:

echo $PS1

How PS1 is set varies from one distribution to another. PS1 can be set universally in /etc/bashrc or /etc/profile. A user can set his own version of the bash prompt in /home/user/.bash_profile or /home/user/.bashrc.

Here is a complete explanation of the bash prompt including what all of the arcane symbols used in PS1 mean:

http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/

--------------------
Steve Stites

veerain 02-26-2015 01:04 AM

Simply try:

Code:

export PS1=">"
in your running bash shell.

RobInRockCity 02-26-2015 09:49 AM

Command-Line Prompt.


All times are GMT -5. The time now is 01:27 PM.