.bashrc problems
For some reason my ~/.bashrc file is not remembered after closing a terminal.
Here is my .bashrc file. Code:
# ~/.bashrc: executed by bash(1) for non-login shells. |
The reason i think that is because when i run alias
Code:
alias teather='adb forward tcp:8080 tcp:8080' |
~/.bashrc file does not need "remembering". Make sure you have this line in ~/.bash_profile:
Code:
if [ -f ~/.bashrc ]; then |
Is it only that one alias that's not appearing, or is it everything in the file? Is this during login, any time you open a console, or what? Could you please explain step-by-step what you're doing and the results you get?
As mentioned, shells do not "remember" anything. Whenever any process closes, the environment that went with it gets deleted along with it. That's why you need configuration files like bashrc; to reload a default environment into a new shell when it starts. So if your alias, or whatever, isn't available, it's either because the file itself isn't being loaded at start-up, or the contents are misconfigured in some way and some of the commands fail to execute properly. As a quick test, try adding a line like echo "~/.bashrc loaded" at the end. If it shows up in the terminal at start-up, then the file itself is loading properly. Be aware that different configuration files are sometimes called for different shell instances. See the invocation section of the bash man page for more on which files get called in which circumstances. Finally, did you see this section? Code:
# Alias definitions. |
All times are GMT -5. The time now is 04:10 PM. |