Wednesday 10 August 2011

PKG - CONFIG setting and Difference between /bin vs /sbin vs /usr/bin vs /usr/sbin

suppose you have installed some package for an example Glib-2.0  in some directory.
Now you want to use this package in your application.
So to include with PKG_CONFIG_PATH:

$ PKG_CONFIG_PATH=c:/glib-dev /  /lib/pkgconfig/  ;
$ export PKG_CONFIG_PATH

Now we can use Glib-2.0 with pkg-config during compiling our application or program.

$gcc  -o test *.c  `pkg-config --cflags --libs glib-2.0`



Difference between /bin vs /sbin vs /usr/bin vs /usr/sbin

/bin This directory contains executable programs which are needed in
single user mode and to bring the system up or repair it.

/sbin Like /bin, this directory holds commands needed to boot the sys-
tem, but which are usually not executed by normal users.

/usr/bin
This is the primary directory for executable programs. Most
programs executed by normal users which are not needed for boot-
ing or for repairing the system and which are not installed
locally should be placed in this directory.

/usr/sbin
This directory contains program binaries for system administra-
tion which are not essential for the boot process, for mounting
/usr, or for system repair.

No comments:

Post a Comment