0

Okay, relatively new Linux User here. (Messed around with Linux for ages, looking for more depth)

I know that all files in Linux can be executed if they have the executable bit.

What are these files? For example, in /usr/bin there is a xyzexample file. Is this file pure binary, or is it a middle language such as assembler or C?

Now that file links to a lib in /usr/lib how is said linking done? The files in the dir are .o files. This is object files like binary or machine code correct?

Now, I execute xyzexample. How does the execution sequence work? How does it link and start the program?

  • xyzexample could even be a script. – muru Nov 4 '14 at 19:38
1

What kind is file you can see by following command

file xyzexample

Executable bit is a different thing. You can see it by

ls -l xyzexample

or

stat xyzexample

For simple understanding it the right to execute file by call it just by name

xyzexample

will execute programm listed in file. Without this bit you are still able to execute it but in different way, for example

bash xyzexample

Please note, that if the programm file there isn't in folders listed in special variable PATH you should indicate the full path for the file:

bash /usr/bin/xyzexample

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.