Solved

Binaries in Linux

Posted on 2011-02-16
7
538 Views
Last Modified: 2012-08-13
When we talk about binaries in linux, whta does mean by it ?
0
Comment
Question by:aashee
  • 4
  • 3
7 Comments
 
LVL 9

Expert Comment

by:jeremycrussell
ID: 34911295
Binaries usually refer to files that are not made up of simple text.  This can encompass several different types of files, but usually is specifically referring to executables (programs & commands) that are in a compiled code form (*not* shell or other scripted files).  Binaries are significant in the fact that they are usually not portable between different platforms.  For instance, a program that was compiled as a 32bit elf on an x86 (intel) based platform is not going to be able to be copied to a System running 64bit Sparc and be runnable without some type of emulation layer.
0
 

Author Comment

by:aashee
ID: 34911448
and in what form are these files before making them binaries. basically they are end result of what ?
0
 
LVL 9

Expert Comment

by:jeremycrussell
ID: 34911504
If the binary file in question is a compiled program, its the end result of some sort of source code being compiled into an object file and linked to be made executable.

What type of program and the language used to write it will determine the exact "compilation" process and can vary greatly.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:aashee
ID: 34911640
it means if i am using fedora 64 bit, i'll download compiled binaries of google chrome to install on it ?
or would i download something else? adn then compile it into binaries.

what are file extension for binaries normally?

and what are file extension of files from which we make binaries ?

what is command to make binaries?

thanks a lot for given such a great information
0
 
LVL 9

Accepted Solution

by:
jeremycrussell earned 500 total points
ID: 34911732
To install google chrome, yes, you would look for the install for your distro "Fedora" or the install that you would run.  I'm not 100%, but you might be able to get Chrome source and compile it yourself.  However, its more involved, I would only recommend it if you are looking to explore compiling source on linux and want to learn.

In the Linux/Unix world, file extensions are not real significant, like with Windows and some other OSes.  File types are derived from the actual contents of the file, and the "Magic Number" (http://en.wikipedia.org/wiki/Magic_number_%28programming%29).

You will not normally see binaries with extensions in linux.  You can use a file explorer or the "file" command in linux to see what type or format a file is.  i.e.

$file /bin/bash
/bin/bash:      ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped

The extensions of source files is pretty much the same.. there are some standards and best practices surround this, but they don't have the same significance as other Operating Systems.

The commands used to compile source vary greatly depending upon what's being done and can be very complex.  There's nothing I can "generally" give you as its very dependent and specific to the task at hand.

However, if you want to dive into learning to program on linux, here's a good tutorial to get you started.  http://www.linfo.org/create_c1.html


However, this barely, breaks the surface of the background to what we've been discussing here.  It's simply one way something is done, as there are many.

You might get you some books on Operating System Design and Programming Languages Design to get a good foundation on all this to really understand it.

Back to your first question though... You can think of a "Binary" as a program made to run our your specific computer.   So in your case, you want "binaries" that would run on the Fedora Linux Distribution.

0
 

Author Comment

by:aashee
ID: 34912127
it means if we have 15 dell computers with process 2.4 Ghz . and 2 mac computers with 2.4 ghz
and 3 hp computers with xeon processors. ?

would it means we have to compile binaries 3 times ?

thanks a lot for your info
0
 
LVL 9

Expert Comment

by:jeremycrussell
ID: 34915560
Since they are all Intel, if they were running the exact same OS, then no, however, if they have different OSes, then yes, you would compile for each different OS.  Should you go the route of compiling.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now