Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I can't answer to all your questions, but I have some answers
1) a .so file is a shared objetc file: A library which is dinamically loaded at program execution. To see the program .so dependencies, do:
1) and 4) ldconfig is an application which read /etc/ld.so.conf file to know where .so can be located. By default, ldconfig knows that they are by default either in /lib or in /usr/lib, that's why when you install a program with .so located in strange directories (/home/foo/lib for example), you need to edit /etc/ld.so.conf to add this path and then run ldconfig to permanently add this path. There's another solution: it's to use LD_LIBRARY_PATH environnement variable. If you don't do that when you run your program, you will have an error message about a .so which can't be loaded or located
also remember that some programs use mime type and not extensions to identify programs (windows uses extension only to tell that files are what, its really quite sad as i can rename a picture to something.exe and windows try to run it, sad, really really really sad
in the bash prompt, that should list all the environment variable it sees
Note, i m not comparing linux and windows, but trying to figure linux's working procedure...Is there any documentation on it? Like, how the Os work..and how later installed source application interact with the OS..where the registry maintains...etc..etc..
add the command either in /etc/profile script to make it permanent for everyone or in ~/.bash_profile for specific user
what is pkg-config ?
Here is a very good def from man page
The pkg-config program is used to retrieve information about installed libraries in the system. It is typically used to compile and link against one or more libraries.
So pkg-config is used for compilation whereas ldconfig is used for execution. That means PKG_CONFIG_PATH is used to know were I can find pkg-config exec and LD_LIBRARY_PATH is used in addition of /etc/ld.so.conf file and ldconfig utility to find where shared libraries are located.
Hope that I'm clear enough
There are two pkgconfig directories because there needs to be one wherever .so files are stored (i.e. /usr/lib /usr/local/lib could both hold libraries and therefore each needs a pkgconfig directory). The .pc files in the pkgconfig directories hold information about the library so that a programmer can retrieve all the information they need to compile programs using the library more easily. For example, say I was writing a program using glib and needed to know where to find the include files, I could type:
pkg-config --cflags glib
or include that as part of a Makefile to find exactly what was needed. Try it yourself. Or try: