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?

1
  • xyzexample could even be a script.
    – muru
    CommentedNov 4, 2014 at 19:38

1 Answer 1

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 

    You must log in to answer this question.

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.