0

I am very new to being a developer, and I have just started using Ubuntu. I am currently trying to run elasticbeanstalk CLI on my terminal, but I always get "eb: command not found" error when I type "eb" into the terminal. I can only get it to work if I type in "source ~/.profile" after I start my terminal.

As far as I can tell, I have followed the installation guide pretty closely. My guess is that .profile isn't loaded every time I start the terminal. Is there anyway I can fix/automate this? .bash_profile and .bash_login doesn't exist on home directory, so I don't think that is interfering.

I'm also not familiar with terms like bash, gnome etc, would help if you guys are able to explain in a not-so-technical way.

1 Answers1

4

~/.profile or ~/.bash_profile is the login script and is not supposed to be loaded for every interactive shell, only by the initial 'login' shell (if one exists). It's a good place to set session-wide environment variables or run one-time things.

To define aliases or set other shell-internal parameters, you should use ~/.bashrc instead.

(Note, you can't avoid having a source ~/.bashrc at the end of your ~/.bash_profile, because due to historical reasons the same 'login' shell that reads profile scripts actually doesn't read ~/.bashrc by default.)

grawity
  • 501,077