linuxnoob
linuxnoob

Reputation: 43

What is the difference between an executable and a shared library

The properties of ls show it is an executable.

enter image description here

And properties of kmod show it is a shared library.

enter image description here

Im trying to check for executables and hash them in ubuntu 14.04 LTS. Is there any way to differentiate executables from the other types? Thanks in advance

Upvotes: 3

Views: 2383

Answers (1)

mohangraj
mohangraj

Reputation: 11084

Executable is a Load file which executes directly in system as a program. As per your question, "ls" is a executable which is used to list the current directory contents. The load for "ls" is placed in "/bin" or you can check using command "which ls". Shared library are the one which do some task that is commonly accessed or used by many executables. These library are loaded into the memory only once and accessed by many programs(executables) at runtime.

Upvotes: 2

Related Questions