Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A week before i tried to change the terminal text PS1 value in .bashrc of my home directory ...as a result my bash login is not exporting any of my PATH, LD_LIBRARY_PATH, INCLUDE_PATH .. whatever i was having in /etc/bashrc is not exported to my login terminal ....
i removed the PS1 entry ...
if i use the command $bash it is working fine ..
but every time i need to type the 'bash' command whenever i open a new terminal ...
whatever i include in .bashrc or .bash_profile also not exported when i select a new terminal ...
There is a difference between the startup files that bash runs at logon and when starting an interactive shell after logging on (the last happens most commonly when starting a terminal emulator in a graphical desktop environment). Commonly the logon files are modified to also run the "interactive non-login shell" files to make the environment the same in each case.
You could add the following at the end of /etc/profile
Code:
case $- in
*i* ) # We're interactive
if [ -f /etc/bashrc ]; then . /etc/bashrc; fi
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
esac
I think that is bash since it's tthe most used one in the most used distros.
I think also that the catkin solution is the best one can do in this case.
I think that is bash since it's tthe most used one in the most used distros.
I think also that the catkin solution is the best one can do in this case.
my shell is bash only ...rhel 6 kernel version 2.3.32-71 ..
There is a difference between the startup files that bash runs at logon and when starting an interactive shell after logging on (the last happens most commonly when starting a terminal emulator in a graphical desktop environment). Commonly the logon files are modified to also run the "interactive non-login shell" files to make the environment the same in each case.
You could add the following at the end of /etc/profile
Code:
case $- in
*i* ) # We're interactive
if [ -f /etc/bashrc ]; then . /etc/bashrc; fi
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
esac
i tried this but it still failing to call the bashrc automatically ... if i call the bash command manually on my shell its working .. but every time i cant do that when ever i open a new terminal ..
just write an "echo this is /etc/bashrc" into /etc/bashrc (and something similar to ~/.bashrc to see if they were invoked.
How do you know they are not executed?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.