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.
I have searched a bunch online but I'm still not able a website which makes this clear.
I have a file ( .alias ) which stores all of my aliases that I normally used. Until recently I was just logging in to my workstation from a terminal and my .alias file was sourced just fine. I Have a file called .login which contains the line "source .alias" and there was no problem.
Now I have a new workstation which I used a terminal window launched from gnome. I can type "source .alias" from the command line and it's fine but I can't seem to get it to automatically read my aliases when I launch the terminal window.
I have tried to modify .bashrc (added source .alias) and .bash_profile (added source .bashrc) with no luck.
Can someone
1) explain what is going on, and
2) tell me what to do to fix the problem?
Basically, .bash_profile is invoked for login shells and .bashrc is invoked for non-login shells. So what you did ought to work. If not, make sure your shell is being invoked as bash (and not sh) -- echo $SHELL should tell you which it is. If it is being invoked as sh you can use chsh to change it to bash. Otherwise, you can put an echo statement into your .bashrc to make sure it is being invoked. What happens when you try to source .bashrc directly from the terminal?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.