I'm trying to run the following command on bash:


which is giving me a

bash: ./home/abcdef/Desktop/jikesrvm/dist/production_x86_64-linux/rvm: No such file or directory

rvm is a bash file, and it does run ok when I attempt to run it from its own folder (production_x86_64-linux). It works also fine if I attempt to run it when opening the terminal in its parent folder, for instance, or even its parent-parent folder.

I've run it over with dos2unix just in case and I've also checked its executing permissions, which seem to be fine.

What am I missing here?

  • You have two different paths so I am guessing a typo. – Panther Apr 20 '15 at 1:55

you can run a bash script by using the following command

bash <location of the script file>

in your case

bash /home/abcdef/Desktop/jikesrvm/dist/production_x86_64-linux/rvm

it will work

what basically the . means is your current directory location.

if you are under your <user> folder then try doing this


it will work but first you should make the file executable using the following command

chmod +x ~/Desktop/jikesrvm/dist/production_x86_64-linux/rvm
  • That worked!!!! I've been fighting this thing for hours. – devoured elysium Apr 20 '15 at 0:49
  • @devouredelysium To add, the . in front means it will look under /home/user. – TheWanderer Apr 20 '15 at 0:49
  • I thought the ./ signalized you wanted to run a script? – devoured elysium Apr 20 '15 at 0:50
  • @Zacharee1 The . actually means that it will look in the current directory and not necessarily the /home/user . if the curent directory is some other location it will not look in /home/user. ` ~` means that it will loo in the /home/user/ location. – Rumesh Apr 23 '15 at 6:30

While you are trying:


shell will always treat . in front of a path as current directory and hence the path will always be a relative path. So, shell is trying to find an executable file in the location:


which is wrong as you can see. You would run a executable script that is the current directory as ./script.sh.

You can actually simply run the executable by using the absolute path (given the script is executable):


Or as ~ is expaneded by shell as $HOME:


Or even just the name of the script if the directory containing the script is in the PATH environment variable.

Now if your script is Not executable, you can run it too without making it an executable by telling the shell which program will handle the script i.e. giving the script as an argument to bash (shell):

bash /home/abcdef/Desktop/jikesrvm/dist/prototype_x86_64-linux/rvm

When you use ./ to execute a file, it will look in the current folder (.) for a folder named home instead of starting from the root (/) directory.

Using the bash command explicitly like in bolzano's answer starts from the root directory instead of the one you're in.

To use the command without bash you could enter




from your home directory assuming it is marked executable.


In addition to the other answers
What you tried was almost fine... But you forgot the extension .sh
- In your case
- or
cd /home/abcdef/Desktop/jikesrvm/dist/production_x86_64-linux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.