[SOLVED] what is binary & library in linux & how its works
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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44
Rep:
what is binary & library in linux & how its works
Hello Friend,
I am new to Linux. learning & practicing it on RHEL 5.7. i will really appreciate your help in this matter. i am confused about Linux Binary & library. i was a Microsoft engineer but now i am planning to make my future in Linux because i want to go in Computer Security.
I have Few Question about Binary & library & its Execution.
1 - what Exactly binary & Library is & what its perform in Linux?
2 - How Linux OS Comes to know which binary to read for particular task where is it written?
3 - In Microsoft we install any software it setup (.exe) files goes in C:\program file just like that when we install any application in Linux in which location its setup files goes?
4 - When we try to run any installed application how os comes to know which file it should read & how that application starts?
i will really appreciate your help in this matter.
1 - I'm not sure what you mean by "binary". Binary is a way of representing numbers, like octal, decimal, and hexadecimal. There is nothing Linux-specific about binary itself. Or do you mean a compiled executable? If so, a compiled executable can be run on the command line to do a specific task. A Linux library is like a Windows dll. It's a collection of compiled routines that programmers can use to perform a specific task when they're writing a program, so that they don't have to develop it from scratch.
2 - What kind of task? When you open an application, you tell the OS the name of the program you want to run, such as "google-chrome" or "firefox". The OS then searches through your PATH environment variable to find any executable matching that name, and when it finds it, it executes it.
3 - Depends on the application. Most executables end up in /bin, /usr/bin, /usr/local/bin, /sbin, or /usr/sbin after installation. Most config files go in /etc/, libraries go in /lib, /usr/lib, /usr/local/lib/, etc.
4 - How is this different than #2?
Last edited by suicidaleggroll; 12-02-2012 at 02:16 PM.
Hello Friend,
I am new to Linux. learning & practicing it on RHEL 5.7. i will really appreciate your help in this matter. i am confused about Linux Binary & library. i was a Microsoft engineer but now i am planning to make my future in Linux because i want to go in Computer Security.
I have Few Question about Binary & library & its Execution.
1 - what Exactly binary & Library is & what its perform in Linux?
A binary and a library are the same on ANY OS. A library is a set of functions, and a 'binary' (in the context that you asked it, I believe), is an executable.
Quote:
2 - How Linux OS Comes to know which binary to read for particular task where is it written?
Same as any other program/OS. Looks at the path, the shortcut, name of the file...it all depends on how the program is called.
Quote:
3 - In Microsoft we install any software it setup (.exe) files goes in C:\program file just like that when we install any application in Linux in which location its setup files goes?
Nope, sorry. Windows *CAN* put programs in C:\Program Files. But it can (and does) put them in lots of other places too. Where they go depends on how the program was written
Quote:
4 - When we try to run any installed application how os comes to know which file it should read & how that application starts?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.