Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-25-2015, 02:16 PM   #1
LQ Newbie
Registered: Jan 2015
Posts: 21

Rep: Reputation: Disabled
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
Old 02-25-2015, 02:31 PM   #2
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
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.
Old 02-25-2015, 02:36 PM   #3
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
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:

Steve Stites
Old 02-26-2015, 02:04 AM   #4
Senior Member
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Simply try:

export PS1=">"
in your running bash shell.
Old 02-26-2015, 10:49 AM   #5
Registered: Feb 2015
Posts: 141

Rep: Reputation: Disabled
Command-Line Prompt.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Make Bash prompt look like Windows C:\ prompt -- *PROBLEM* arkadios Linux - General 5 07-24-2012 12:29 PM
What prompt do you use? 809areacode Linux - General 4 08-18-2011 02:06 AM
terminal prompt different from console prompt dh2k Slackware 5 03-29-2010 05:38 PM
My own prompt seprob Debian 5 12-04-2009 01:37 PM
passing parameters from a unix shell prompt into a windows cmd.exe prompt nano2 Programming 1 09-01-2009 12:26 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration