Not to get too technical here, but one of the unique things about Linux is that you can
have more than one version of an application, and
more than one version of a system library, installed on your computer at the very same time.
Unlike Windows, Linux clearly supports the notion of library versions.
If you take a quick peek, say in the /lib
directory of your machine, you'll see what I mean. For each library listed here, you'll see one or more numbered libraries, and a few "symbolic links" (basically, shortcuts) referring to one of them. For example, picking one arbitrary set from my system:
/lib/libncurses.so -> libncurses.so.5
/lib/libncurses.so.5 -> libncurses.so.5.5
When an application needs to load libncurses,
it can now be just as specific or as generic as it wishes to be. If it wants "version 5.5," it'll get that. If it wants "version 5.x," fine. And if it simply wants "libncurses," asking thereby for the latest or the default one, fine.
There's an obscure little command called /sbin/ldconfig
that you may have never heard of, or that you've simply never seen running. This command rebuilds a "cache" that the loader uses to find libraries more quickly. If you change the libraries, root
needs to run this program to rebuild this cache.
As for applications, Linux (like Windows) uses the notion of a path.
If the exact location of the file to be run is not specified, Linux searches down the path from front to back, always running the first one it finds.
If you want to know which file the path-search would
run, but without running it, then the which
command will do that, e.g.: which setkey
Unlike Windows, the current-directory (".") is not
on the default path ($PATH). Therefore if you want to run a program located in your current directory, you must
specify that it's in the current directory: "./programname ...
" ("." refers to "the current directory," and "/" is the usual Linux/Unix directory-name separator.)
Nothin' to it. Five cents, please."