Why my terminal starts with bash-4.2$ on fedora 18?
Dear users
I have got a problem and I need your help. My terminal starts with bash-4.2$, and I don't know how to restore it back to normal working condition. Please how can I resolve this issue. What should I have done that make the terminal behave in this way? I already visit http://www.linuxquestions.org/questi...me-4175466096/ Your help is highly appreciated. Regards Lawal |
Quote:
Quote:
You can set your prompt be editing your ~/.bashrc file. Look for the PS1 prompt line to edit. To find out what the default PS1 prompt is, as it was when you installed Fedora, look at /etc/bash.bashrc or /etc/skel/.bashrc. Copy the PS1 line and past it into your ~/.bashrc. For more information on shell prompt, read the Bash Prompt HOWTO. |
Quote:
Check in Code:
/etc/skel/ Code:
lxde@gentoo-asus ~ $ ls -al /etc/skel |
Why my terminal starts with bash-4.2$ on fedora 18?
Dear bigrigdriver and andrewthomas,
Thank you for your email. Quote:
I try to edit /.bashrc using Code:
vi When I run Code:
cd /etc/skel/ Code:
[root@localhost skel] So, now what should I do? Please don't forget I am inexperience. Waiting for your help. With kind regards Lawal |
Quote:
Code:
vi ~/.bashrc PHP Code:
Code:
cd ~ |
Why my terminal starts with bash-4.2$ on fedora 18?
Dear mddesai,
Thank you for your email. I try Code:
vi ~/.bashrc Quote:
Waiting for respose. |
Quote:
Code:
$ who am i |
Why my terminal starts with bash-4.2$ on fedora 18?
Thank you mddesai,
The result of the two command Code:
bash-4.2$ who am i Lawal |
hmmm strange. There is home directory for user 'mohammed', but why you said "vi ~/.bashrc only works from root". besides its not 1(one), but its l(L) in ls -l /home. probably ownership is set wrong. Anyway try again ls -l /home
it show something like this Code:
drwx------. 64 mohammed mohammed 4096 Nov 19 19:27 /home/mohammed |
Why my terminal starts with bash-4.2$ on fedora 18?
Thank you mddesai,
Yes, if not from root "vi ~/.bashrc" give "~/.bashrc" [New File] Sorry for the above mistake. Code:
bash-4.2$ ls -l /home Lawal |
Let me clarify what you are saying...
as root you can open .bashrc, however, as user the .bashrc is NEW file... In that case, do following... Code:
su - mohammed type following: PHP Code:
Code:
. /home/mohammed/.bashrc Note: I assume you know how to enter text in vi editor. |
Why my terminal starts with bash-4.2$ on fedora 18?
Thank you mddesai,
Quote:
I run the codes as you said, typed PHP Code:
Code:
:wq! Thanks once more Lawal |
Quote:
Quote:
Either replace your /etc/bashrc from the here (post #2) http://fedoraforum.org/forum/showthread.php?t=104297 Or, add following lines to your /home/mohammed/.bashrc file Code:
export PS1="[\u@\h \W]\$" |
Why my terminal starts with bash-4.2$ on fedora 18?
Thanks you so much mddesai,
Quote:
If I get you right, after saving, then I should open the file again using vi editor and then source. Please confirm if I am right, just in case it happens again. Quote:
Quote:
Thanks Lawal |
Quote:
To put in simple words...
Code:
$ . ~/.bashrc Code:
$ source ~/.bashrc |
All times are GMT -5. The time now is 01:14 PM. |