Solved

Binaries in Linux

Posted on 2011-02-16
7
588 Views
Last Modified: 2012-08-13
When we talk about binaries in linux, whta does mean by it ?
0
Comment
Question by:aashee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

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…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

710 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