LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-02-2012, 01:45 PM   #1
Rohant
Member
 
Registered: Oct 2011
Location: India, Mumbai
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44

Rep: Reputation: Disabled
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.

Thanks in advance
 
Old 12-02-2012, 02:14 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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.
 
1 members found this post helpful.
Old 12-02-2012, 03:08 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by Rohant View Post
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.
Uhh....sorry, no. You've been registered here for over a year now. You were 'new' last year:
http://www.linuxquestions.org/questi...urgent-910925/

Have you not progressed ANY since then?
Quote:
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?
Same as #2.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
works well: etch/amd64 (x86_64) && java browser plugin HowDoIProgramIt Debian 2 09-22-2007 08:26 PM
AOL UK && BT Voyager 100 && Slackware 10.2 && RP-PPPoE pitt0071 Linux - Networking 3 01-17-2006 06:10 AM
Japanese canna won't work : Warning: かな漢字変&am OrganicOrange84 Debian 3 06-30-2005 02:28 PM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
How to make sound works on FreeBSD & mount extended partition & ATI radeon driver Ninja_212 *BSD 3 11-02-2004 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration