LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   The terminal displays bash-2.3-$ instead of Username@computename (https://www.linuxquestions.org/questions/linux-newbie-8/the-terminal-displays-bash-2-3-%24-instead-of-username%40computename-880177/)

shumbamajachani 05-11-2011 04:29 PM

The terminal displays bash-2.3-$ instead of Username@computename
 
My terminal is showing bash-2.3-$ instead of Username@computename. I am not a linux administrator so please try to answer it in plain language so that i full understand

Regards

Blessing

TobiSGD 05-11-2011 05:12 PM

Open a terminal and make sure that you are in the home-folder of your user. You can do that with a simple
Code:

cd
Now type in this code
Code:

echo "PS1='\u@\h:\w\$ '" >>.bashrc
and press the Enter key. This will add a new prompt to your Bash's config file. Now close the terminal. The next time you open it again you will have the usual prompt.

You can tweak the prompt to your liking, have a look at this.

sycamorex 05-11-2011 05:21 PM

or add the following to .bashrc

Code:

. /etc/profile

shumbamajachani 05-12-2011 01:54 AM

Hi

Thanxs it worked. I am glad

Blessing

brownie_cookie 05-12-2011 02:03 AM

if you're happy with your solution, please mark it as solved ^^

:hattip:

MTK358 05-12-2011 11:32 AM

Here are some links on how to customize your prompt:

http://www.pantz.org/software/shell/...ellprompt.html
https://wiki.archlinux.org/index.php/Color_Bash_Prompt
http://www.cyberciti.biz/faq/bash-sh...linux-or-unix/


All times are GMT -5. The time now is 01:12 PM.