In the installation instructions for Android Studio they say:
3. [OPTIONAL] Add "{installation home}/bin" to your PATH environment
variable so that you may start Android Studio from any directory.
I did that according to this Stack Overflow question. But how do I start it now? The problem is I need to execute a shell script studio.sh and I am afraid these are not visible for the PATH variable.
I should be able to call it in any directory in terminal by calling just studio.sh.
EDIT: more info
studio.sh runs the Android Studio
I followed the official installation instruction which came with the android-studio zip file (form official website).
I added
export PATH=$PATH:$HOME/Installs/android-studio/bin
at the end of ~/.profile.
Adding more outputs:
$ ls -l $HOME/Installs/android-studio/bin/studio.sh
-rwxr-xr-x 1 roman roman 6985 bře 21 18:26 /home/roman/Installs/android-studio/bin/studio.sh
$ echo $PATH
/home/roman/bin:/home/roman/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/roman/Installs/android-studio/bin/studio.sh
$ type studio.sh
bash: type: studio.sh: not found
locate studio.sh? – WinEunuuchs2Unix Mar 31 '18 at 22:04type studio.shmight work better – wjandrea Mar 31 '18 at 22:09type -a studio.shmight work even better :D – WinEunuuchs2Unix Mar 31 '18 at 22:10bash: type: studio.sh: not found. I guess this implies it's not in the PATH after all. I updated the question to show the instructions I followed. The path tostudio.shis certainly correct - I tested it withcd. – SlowerPhoton Mar 31 '18 at 22:13whichandtypewill only find executables in the path. But to add it to the path we need to know what directory it is in. For thislocate studio.shalways works unless it isn't even installed on your system. – WinEunuuchs2Unix Mar 31 '18 at 22:16locateuses a database that's not updated immediately. I think you want to usefindinstead, e.g.find ~ -name studio.sh -type f– wjandrea Mar 31 '18 at 22:20$HOME/Installs/android-studio/bin. – SlowerPhoton Mar 31 '18 at 22:21studio.sh) is in, how would I add it to the PATH otherwise? – SlowerPhoton Mar 31 '18 at 22:23ls -l $HOME/Installs/android-studio/bin/studio.sh? And the output ofecho $PATH? – wjandrea Mar 31 '18 at 22:25updatedbcommand would have to be run first. – WinEunuuchs2Unix Mar 31 '18 at 22:26updatedblocate now finds it. Where are we heading with this? – SlowerPhoton Mar 31 '18 at 22:33