PS1 is the environment variable in the Bourne shell and variants which specifies the command prompt.

learn more… | top users | synonyms

0
votes
2answers
76 views

What is the best practice of customizing the Bash prompt (aka the PS1 environment variable)?

I am trying to add Git branch name to my Bash prompt by changing the PS1 variable like this: PS1=`echo "$PS1" | sed 's/\\\\\$ $/\$(__git_ps1)\\\\\$ /'` And if I understand correctly, it is not ...
1
vote
1answer
76 views

In the command line prompt, how do I show the full home path instead of the tilde (~)? [closed]

In the terminal prompt, how do I get to see the full path of the home directory? That is, from root@pcname:~ # to root@pcname:/home/username #
1
vote
1answer
84 views

display only the git root directory if it is a git directory in PS1

I know you can do something like this for the PS1: Corvid @ ~/github/gitdirectory (master) $ but, this might be a bit odd: I want to only show the basename of the git directory, no matter where I ...
1
vote
1answer
30 views

where does the discrepancy between \# in PS1 and n in !n come from?

Something has been gnawing at me for a while now and I can't seem to find a relevant answer either in man pages or using your 'Don't be evil' search engine. My .bashrc has the following: shopt -s ...
7
votes
3answers
1k views

Where can I find a complete reference for the $PS1 variable?

The default PS1 variable on my machine (Kubuntu 13.10) is this: \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ I'm looking for a reference for how the $PS1 variable works that, at ...
0
votes
1answer
36 views

PS1 set to display Desktop

How do I set my default PS1 to ~/Desktop? I have tried changing it in my ~/.bashrc but to no avail. Can someone give out a detailed solution to be able to make changes to PS1 to the directory we ...
1
vote
1answer
668 views

how to make ps1 display full path name

using ubuntu 12.04.3, i've modified my PS1 to [\u@\h ]\w$ which SHOULD display as follows: [user@host /home/user]$ but it doesn't it's still [user@host ~]$ this used to work. what changed?
-1
votes
1answer
1k views

How to FULLY change the color of the terminal prompt

I've changed ~/.bashrc file of root and my own account. The problem is (maybe because of my encypted home directory): when I log in to my normal account: no color, when I log in as root: color! But ...
2
votes
1answer
509 views

How to keep the coloring in bash when using `sudo -i`?

I have changed PS1 variable in /etc/bash.bashrc to PS1="\n\[\033[0;37m\]\342\224\214\342\224\200\$(if [[ \$? == 0 ]]; then echo ...
2
votes
3answers
217 views

Command line prompt looks strange in virtual console

In a terminal emulator like xterm my prompt looks like this: [august@macmini ~]$ but in a virtual console the string ;linux is prepended to the prompt to make it look like this: ...
8
votes
3answers
3k views

Long lines overlap in Bash PS1 customized prompt

I have configured a fancy two-line PS1 bash prompt, with server name, time, user name and other useful variables. PS1="\n\[\033[1;34m\]\342\226\210\342\226\210 \u @ $SERVER_NAME""$BBlue"" ...
31
votes
3answers
26k views

How can I shorten my command line (bash) prompt?

Currently it is: michael@Castle2012-Ubuntu-laptop01:~/Dropnot/webs/rails_v3/linker/spec/controllers$ Outside of renaming my machine and directory structure... How could I make it be something ...
2
votes
3answers
5k views

Emulator PCSX Reloaded - Fullscreen not working on Unity

I have an older PS1 console with a couple of games I bought some years ago. On my pc, I'm using PCSX Reloaded - the best PS1 emulators for Linux I found so far. But I'm having a little issue on ...
9
votes
1answer
2k views

PS1 problem, messing up CLI

I did a simple PS1 assignment PS1="\e[0;31m[\W]\$ \e[m " All I wanted to do was to change the prompt color and display only the relative path. However this messes up the CLI. For example, when ...
9
votes
4answers
1k views

What does the name after '@' at terminal prompt mean?

I noticed that when in terminal the prompt is generally in the format username@users: or I have even seen username@(none):. I get that the first part is the logged in person's user name, but what is ...