LinuxQuestions.org
Help answer threads with 0 replies.
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 08-29-2012, 02:16 PM   #1
gacanepa
Member
 
Registered: May 2012
Location: San Luis, Argentina
Distribution: Debian
Posts: 205

Rep: Reputation: 27
Meaning of characters in $PS1?


Hi there!
These are the contents of the shell environment variables $PS1 and $PS2 (Prompt String 1 and 2, respectively):
Code:
gacanepa@debian:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
gacanepa@debian:~$ echo $PS2
>
Anyone would be as kind as to point me in the right direction to understand what those characters mean and/or what they are used for?
 
Old 08-29-2012, 02:22 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,789

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
here is a very good guide about it: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/ Obviously it is a bit old, so not really up to date, but the basics are there: http://tldp.org/HOWTO/Bash-Prompt-HO...sequences.html

Last edited by pan64; 08-29-2012 at 02:24 PM.
 
1 members found this post helpful.
Old 08-29-2012, 02:27 PM   #3
gacanepa
Member
 
Registered: May 2012
Location: San Luis, Argentina
Distribution: Debian
Posts: 205

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by pan64 View Post
here is a very good guide about it: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/ Obviously it is a bit old, so not really up to date, but the basics are there: http://tldp.org/HOWTO/Bash-Prompt-HO...sequences.html
Thank you so very much! (PS: I can't seem to be able to find the 'Add to reputation button', but I marked your comment as useful and the thread as solved).
 
Old 08-29-2012, 02:43 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,789

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
add reputation is on the left side, the "white" icon next to the linux penguin.
 
Old 08-29-2012, 02:52 PM   #5
gacanepa
Member
 
Registered: May 2012
Location: San Luis, Argentina
Distribution: Debian
Posts: 205

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by pan64 View Post
add reputation is on the left side, the "white" icon next to the linux penguin.
Attached is a screen cap of your last answer as I see it. There is no white icon next to the linux penguin.
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	11
Size:	21.0 KB
ID:	10499  
 
Old 08-29-2012, 03:09 PM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,789

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
you won. There is a setting in your profile I think (edit options/show reputation) to enable it.
Attached Thumbnails
Click image for larger version

Name:	untitled.JPG
Views:	12
Size:	33.6 KB
ID:	10501  

Last edited by pan64; 08-30-2012 at 12:43 AM.
 
  


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
LXer: Mastering Characters Sets in Linux (Weird Characters, part 2) LXer Syndicated Linux News 0 11-25-2009 11:30 PM
splitting numbers and characters from an array of characters. trscookie Programming 6 11-14-2008 09:34 AM
how to keep changes to PS1 across terminals? wrapster Solaris / OpenSolaris 5 05-28-2008 09:51 PM
How to modify the names of files and replace characters with other characters or symb peter88 Linux - General 2 12-10-2006 03:05 AM
PS1 variable wogga Red Hat 2 05-26-2004 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:57 PM.

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
Open Source Consulting | Domain Registration