Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-22-2006, 02:21 AM   #1
Registered: Oct 2005
Location: Bangladesh
Posts: 492

Rep: Reputation: 30
Cool How to run a binary file

Hi ,

I am using Redhat Enterprise Linux 4 , I want to install/run a binary file . i.e., i want to install a file which is a binary distribution . Plz help me how i can do it ?
or give me the perfect command...

Old 05-22-2006, 02:40 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
just run it: "/path/to/binary_file" might want to run it via a shell "sh /path/to/binary_file"
Old 05-22-2006, 03:43 AM   #3
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
And make sure it's marked as executable (x permission).
Old 05-22-2006, 04:01 AM   #4
Registered: Jan 2004
Location: /dev/random
Distribution: Gentoo amd64, CrunchBang amd64
Posts: 350

Rep: Reputation: 32
easy way to mark it as executable (if a bit indiscriminate as to user privileges)
chmod a+x /path/to/file
Old 05-22-2006, 11:02 AM   #5
LQ Newbie
Registered: Apr 2005
Distribution: Fedora Core 5
Posts: 17

Rep: Reputation: 0
Make sure it has executable permissions. As root type ls -l
This will give an output something like this:
-rw-rw-r-- 1 anthony anthony 305057 May 18 15:48 filename
Its the first part you want to look at. The dashes and letters. the r stands for read, the w stand for write, and the x that isnt there means you can execute, or run it.
Because the file isnt executable, type as someone sugested earlier:
chmod a+x filename
this will alter the permissions of the file, to be executable, for all.Now ls-l should display something like this:
-rwxrwxr-x 1 anthony anthony 305057 May 18 15:48 filename
Notice the extra x's in the first part, meaning it is executable. Now to run it, type ./filename
This will run a file in the current directory. That is the directory you are currently in. Hope this helps. If not let us know.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
run amd64 binary on 32bit kernel ? juice99 Debian 3 01-19-2006 06:37 AM
can we run the binary file directly kamesh156 Linux - General 1 10-17-2005 07:57 AM
can't run binary files abs Slackware 12 01-21-2005 01:56 AM
Why won't this binary run? islandkid Linux - General 15 09-01-2002 02:51 PM
How to run binary at booting time hai_rajneesh Linux - Software 2 06-23-2002 03:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:37 AM.

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