LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-25-2015, 02:16 PM   #1
linuxew
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
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
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
 
Old 02-26-2015, 02:04 AM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

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

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

Rep: Reputation: Disabled
Command-Line Prompt.
 
  


Reply


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


All times are GMT -5. The time now is 06:12 AM.

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