0

I have a binary "test", I try to run it as follows:

root@g-6:~# ./home/test
-bash: ./home/test: No such file or directory

Have you an idea, please, about the error ?

Thank you so much.

3
  • 2
    or /home/test without the . in front.
    – Tyson
    Jun 22, 2015 at 12:18
  • Off topic, but is test a program from a trusted source? If not, or if you wrote and compiled it yourself, it might be a better idea to run it as a normal user rather than as root.
    – Mr Lister
    Jun 22, 2015 at 12:24
  • 1
    The error is entirely self-explanatory. What could possibly be unclear about it? It's saying that ./home/text does not refer to any file or directory that exists. Were you really in a directory with a sub-directory called home containing a filed called test? That seems really unlikely. What do commands like ls ./home/test return? Jun 22, 2015 at 12:36

1 Answer 1

1

Is the program really located in /home/test? With ordinary Linux distributions, that would be an odd place to put a program.
Assuming that you mean your home directory, the usual location would be /home/ plus your user name, so the program would be at /home/researcher/test. Or if it's in the home directory for root, /root/test (note: no "home" there).

So that's what you would type if you want to run it. /home/researcher/test as a normal user, /root/test as root.

Or go to the directory first with cd /home/researcher (or cd /root) and then type ./test.

The thing with . is that it means "the current directory". So if you're in ~, which you are, the command ./home/test would mean ~/home/test, which is not the same as /home/test!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .