Reputation: 2519
I have studio.sh
file in my android-studio/bin folder
, which I would like to use as a command in bash (like launching any other normal application).
I read somewhere that adding this line to ~/.profile
should work,
export PATH=$PATH:/home/goel/android-studio/bin
But it doesn't work. Whats the correct process?
Upvotes: 1
Views: 2329
Reputation:
Is studio.sh
executable? Have you tried ./studio.sh
inside its containing folder to check whether it runs at all?
Upvotes: 0
Reputation: 169
Add the script folder name to PATH environment variable in ~/bash.rc
file
and you can also create alias for you script in ~/bash.rc
and source the /etc/bash.bashrc
file, now you can issue your script or alias name in any terminal. Hope this helps.
Upvotes: 2
Reputation: 241788
If you change your PATH in a .profile, you still have to make the shell read the .profile. Starting a new terminal is sometimes not enough (some terminals don't read the .profile), in which case you have to log out and back in.
Upvotes: 0