Forum Discussion
Bash shell prompt is displaying odd
Your .bashrc profile is deleted some how. There would have been a recent change or event happened on your server, you can investigate it. Or a simple fix have it copied from a server where it exists to this server or manually create it.
If you login to your server, run the below commands, that should list your .bashrc file. If it doesn't exist you are required to create it.
Let me reproduce your scenario.
ltm:Active:Standalone] ~ ls -la .bashrc
-rw------- 1 user user 124 Feb 8 09:07 .bashrc
ltm:Active:Standalone] ~ cat .bashrc
.bashrc
User specific aliases and functions
Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
:ltm:Active:Standalone] ~ rm .bashrc
rm: remove regular file `.bashrc'? y
After I delete the .bashrc file, When I start a fresh session, see how the shell looks.
bash-3.2
bash-3.2
bash-3.2
bash-3.2 vi .bashrc
bash-3.2
Paste the below in this file,
.bashrc
User specific aliases and functions
Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
After creating you should see the files like below.
bash-3.2 ls -la
total 886
drwx------ 3 user user 3072 Mar 30 02:00 .
drwxr-xr-x 27 user user 1024 Mar 12 08:00 ..
-rw------- 1 user user 53478 Mar 29 14:34 .bash_history
-rw-r--r-- 1 user user 24 Jan 15 2016 .bash_logout
-rw-r--r-- 1 user user 598 Mar 5 2012 .bash_profile
-rw-r--r-- 1 user user 132 Mar 30 02:00 .bashrc
Now its completed fixed.
:Active:Standalone] ~
Note: the changes will not reflect unless a fresh session is opened.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
