I logged into my computer from a normal user and executed the following command:
pratheep@pratheep-laptop:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
I know that if I keep the value of PS1='\u@\h:\w\$ ' then also it will display the same.
I want to know what the extra thing in front i.e.
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)} is for?
I usually use a prompt as easy as "PS1=root# " or similar.For the fun of it i tried to configure my root prompt, but i don't get the syntax right.That is how i use it right now PS1='${debian_chroot:+($debian_chroot)}[\[\033[01;31m\]ROOT]\$ 'but vim shows me that a closing bracket is missing.
Hello, I'm a newb to the whole ubuntu but I wish I haad learned about this a long time ago. So heres my scenario and question. I'm trying to make a simple menu in the bash shell using gedit that allows me to select the back ground colors of the screen and to pick different variable for the prompt. One such variable is the changing of the prompt color.
I added this command to my root .bashrc file to add color to my prompt
and to simplify its path portion to the lowest level directory,
Code:
export PS1="\e[1;31m\u@\h:\W\$\e[m "
and my bash prompt comes up ending with $ when I expected #.
Also, occasionally, when I enter a command, part of that command
becomes part of my prompt!
If the following is a prompt and command,
Code:
Hi!
I wanted to simplify my bash prompt, so I edited my etc/bashrc file. I thought this was the file that would override any other env files. When I opened it, I saw that the way it was setup was not what my prompt looked like, although I forget exactly what was there. But i edited it the way I wanted it
Code:
PS1="$ "
and saved it.
I'm trying to permanently alter my bash prompt. I've read that I need to edit my .bashrc file. Would someone mind telling me where to find this? Is this the file titled bash.bashrc in the etc folder?
Also, should I edit the "PS1=" section of this file for the desired effect? :confused:
I'm having an odd problem with the .bashrc file.
I've added the following line so git could show me the current branch on prompt (I saw this tip here)
#Show branch in status line
PS1='[\W$(__git_ps1 " (%s)")]\$ ' export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"'
But it dosen't work.
Also, I can't add my own aliases, if I add some to .baschr_aliases it doesn't seem to read them.
Hello,
I have problem at my online backup script for Ubuntu.
I have added an echo to debug it.
Code:
huangyingw@laptop:~/bashrc$ cat tubak.sh
#!
In my .bashrc file I configured how I would like my prompt to be displayed. My .bashrc is sourced in .bash_profile. The command in the .bashrc file is:
PS1='[\t] \u@\h is $PWD :: '
I switched the user (for me) timezone to GMT+0 using tzselect.