answersLogoWhite

0

Check for the executable permission. ls -l will tell you the precise permissions of a file. On the very end of the permissions string, an executable will have an x there.

Linux does not determine things like executability the same way Windows does. While Windows will happily (And blindly.) treat a file as an executable when it has certain file extensions, Linux thinks instead about two things: Whether it has a certain permission to run, and if its "interpreter" is available.

Yes, even precompiled binaries run this way. In their case their "interpeter" is merely the loader that passes the program to the kernel for launch.

There is a way to run scripts in Linux without the execute permission, and that's by invoking their interpreter directly yourself, such as the command:

$ python2 /path/to/python/program.py

In this case to Linux you're merely running python with the program you want as an argument.

This does NOT work for precompiled binaries, which MUST be given executable permissions to load and run.

User Avatar

Wiki User

12y ago

What else can I help you with?