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

learn more… | top users | synonyms

1
vote
2answers
68 views

Problems embedding a command in Bash PS1

Hi all I am having problems trying to embed this command in my bash prompt so that it will update itself each time the prompt is shown. I would like it to be part of the prompt itself free -m | tr -s ...
0
votes
1answer
134 views

Terminal: Change the color of my hostname and username

When using the terminal, I want both my username and my hostname to have separate color schemes. Is that possible with Ubuntu's default terminal emulator(if not, is it possible in terminator?)?
1
vote
1answer
33 views

Is there any way to create a custom PS1 for particular terminal profile

Since I find the custom terminal a bit bland, I like using the PS1 variable to make it more informative, and use a background image and custom text colours. I like the profile functionality, so I have ...
0
votes
2answers
64 views

Is .bashrc correctly setting the graphical terminal title?

From the default .bashrc is this: if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else PS1='${...
4
votes
2answers
210 views

How to personalize the command prompt?

I just recently (re)installed Ubuntu on my pc and I have a slight "problem". I can't figure out what commands (?) I should write in my bash_profile, to have the following result: < User>@< ...
4
votes
1answer
337 views

How to clear PS1's formatting in gnome-terminal?

I have configured gnome-terminal in .bashrc to have custom colours: PS1='${debian_chroot:+($debian_chroot)}\[\033[00;37m\][\[\033[00;32m\]\t\[\033[00;37m\]] \[\033[01;34m\]\u\[\033[00;37m\]@\[\033[01;...
2
votes
2answers
576 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
387 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
223 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
38 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 ...
11
votes
3answers
4k 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
40 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
2k 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
2k 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
995 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 \"[\[\033[0;32m\]\[\033[01;32m\]\342\234\223\[\033[0;37m\]]\342\224\200\...
2
votes
3answers
385 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: ;linux[august@...
10
votes
3answers
5k 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"" \w""$...
60
votes
4answers
60k 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
7k 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 ...
12
votes
1answer
3k 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 ...
10
votes
6answers
2k 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 ...