Solved

Binaries in Linux

Posted on 2011-02-16
7
580 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

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…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.

756 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