Solved

Binaries in Linux

Posted on 2011-02-16
7
563 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

821 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