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! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-28-2004, 07:26 AM
|
#1
|
LQ Newbie
Registered: Jan 2004
Posts: 4
Rep:
|
How to run executable files?
Can anyone teach this newbie how to open an executable file under Linux?? thanks!
|
|
|
01-28-2004, 07:52 AM
|
#2
|
Member
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507
Rep:
|
From the command prompt type /path/to/executable/name_of_prog.
If you are in the same directory as the executable then "/path/to/executable/" above equates to "./"
Check that it is executable with ls -l, you should see a string like "-rwxr-xr-x", where the three x's mean permission for the owner, group and others to execute the file.
If you're missing an x, the command chmod ugo+x will give all the above permission (check the manpage 'man chmod' for more on this).
If the executable still appears to be doing nothing, then it depends on what it is and you'd have to post more information.
John
p.s. unless by "open" you meant "look at"?
|
|
|
01-28-2004, 07:53 AM
|
#3
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
Teach a Man to fish.................
http://www.ss64.com/bash/
|
|
|
01-28-2004, 07:54 AM
|
#4
|
Member
Registered: Jan 2004
Location: cheshire, uk
Distribution: Ubuntu Hoary
Posts: 605
Rep:
|
under gui (eg, kde or gnome, etc), you should be able to just click on the file.
from within the console (command prompt), an example is best -
assume you want to run a file called program1 in directory /usr/bin.
you can either simply type /usr/bin/program1 at the command prompt, or you can navigate to the directory and type program1 or, if the directory isn't in your $PATH environment variable, you might need to type ./program1.
hope this helps
|
|
1 members found this post helpful.
|
01-28-2004, 08:02 AM
|
#5
|
Moderator
Registered: Aug 2002
Posts: 26,638
|
Welcome to LinuxQuestions.
You will find many answers to your questions faster by searching this website or the web. It can be difficult because as a newbie you might not know what to search for.
What program(s) are you trying to execute?
What makes a linux file executable is its permissions. linux does not care what a file is named or its extension. You can change a files permissions using the chmod console command. Permissions also determines who can read / write / execute. Some files can only be executed if logged in as root.
linux path environment is different then windows. linux only searchs the path not the current working directory for the file. To execute a program in the current work directory use in a console windows use.
./<file_name>
For all other files use the full path.
|
|
|
01-28-2004, 09:56 AM
|
#6
|
Senior Member
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Rep:
|
Vaughly about executing files:
lugo~$ cat file.txt
echo 'filth'
lugo~$ bash file.txt
filth
How to pass arguments to a script:
lugo~$ cat file.txt
echo 'filth' $1 $2
lugo~$ bash file.txt covers all
filth covers all
Bash adds an argument of its own '$0':
lugo~$ cat file.txt
echo $0 'says filth' $1 $2
lugo~$ bash file.txt covers all
file.txt says filth covers all
No need to put 'bash' if put #!/bin/bash at top of file:
lugo~$ cat file.txt
#!/bin/bash
echo $0 'says filth' $1 $2
lugo~$ file.txt
permission denied
lugo~$ chmod a+x file.txt
lugo~$ file.txt
file.txt says filth covers all
For another language put, say, #!/usr/bin/python, if that's where python is.
Wonder if I've got anything to do? 
|
|
|
10-06-2007, 04:40 AM
|
#7
|
LQ Newbie
Registered: Oct 2007
Posts: 2
Rep:
|
slill not able to run the executable file
i am still not able to run executable file
I am trying to install the Real player on my PC. I had downloaded the .bin file to my home. But when I type ./Realplayer answer comes as No such file or directory. I am using Ubuntu linux ,its version for 64 bit pc's
|
|
|
10-06-2007, 04:50 AM
|
#8
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep: 
|
Is the file actually called "Realplayer"? If not, use some common sense..
|
|
|
10-06-2007, 08:15 AM
|
#9
|
Senior Member
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Rep:
|
Quote:
Originally Posted by rahulsivan
i am still not able to run executable file
I am trying to install the Real player on my PC. I had downloaded the .bin file to my home. But when I type ./Realplayer answer comes as No such file or directory. I am using Ubuntu linux ,its version for 64 bit pc's
|
Don't quite understand.
If there's a file in /home/george/, i.e. your home directory, called Realplayer.bin then that might explain it. 'No such file or directory.' because you didn't put .bin on the end. If it's a windows file it won't run without wine or something like that.
Doesn't Ubuntu have something to click, xmms or whatever? Otherwise install realplayer or something like using an instalation program - again there's one in Ubuntu's menu I think.
|
|
|
10-10-2007, 03:28 AM
|
#10
|
LQ Newbie
Registered: Oct 2007
Posts: 2
Rep:
|
Quote:
Originally Posted by lugoteehalt
Don't quite understand.
If there's a file in /home/george/, i.e. your home directory, called Realplayer.bin then that might explain it. 'No such file or directory.' because you didn't put .bin on the end. If it's a windows file it won't run without wine or something like that.
Doesn't Ubuntu have something to click, xmms or whatever? Otherwise install realplayer or something like using an instalation program - again there's one in Ubuntu's menu I think.
|
Thanks for reply,
I had put .bin at the end. Sorry for missing it on the text. Actually I have problem with every executable files which I try to install from external sources. I just mentioned one.
I have to install a software named GrADS which is a Data Plotting software used for Meteorological purposes. I put the folder grads in my home, edited my .bashrc file and typed gradsc at the command line .Result was
bash: /home/rahul/grads/bin/gradsc: No such file or directory
the file is the on the path location, same as in the case of realplayer
|
|
|
10-10-2007, 07:24 AM
|
#11
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,430
|
Pick one example eg the GrADS prog and do the following:
1. cd into the dir where the program file is/are
2. use the cmd
ls -l
and show us the results.
3. use the cmd
pwd
and show results
4. use cmd
whoami
and show results
in re your last comment, note that Linux (and Unix generally) is case-sensitive ie GrADS is != grads
|
|
|
12-07-2007, 10:05 AM
|
#12
|
LQ Newbie
Registered: Dec 2007
Posts: 1
Rep:
|
i think what kelly is trying to ask is how to run .exe files
inorder for ya to do that you have to download wine from ... i'll get back to ya on that
|
|
|
12-07-2007, 11:07 AM
|
#13
|
Member
Registered: Apr 2002
Location: Greenville, SC
Distribution: Debian, antiX, MX Linux
Posts: 639
Rep: 
|
Here is how to do it
Quote:
Originally Posted by rahulsivan
i am still not able to run executable file
I am trying to install the Real player on my PC. I had downloaded the .bin file to my home. But when I type ./Realplayer answer comes as No such file or directory. I am using Ubuntu linux, its version for 64 bit pc's
|
The Realplayer file that typically gets downloaded often comes as a Realplayer.bin file or something very similar. First, make sure you are in the directory containing the file. You may have downloaded it to your desktop, so from your home directory, it is possible that you have to change to that directory, for example,
Next, you want to make that file executable because it typically contains a script that installs the player and its libraries elsewhere on your system. Therefore, to make the file executable, type
Code:
chmod +x Realplayer.bin
or replace that with the actual name of the file.
Now it will be possible to run that file. Chances are, the system will want to install this file in some system writable directory, so to account for that likelihood, become the root user.
Password:
Code:
<type-your-root-password-here>
Now you ought to be able to run the script and get it installed in an appropriate place:
# # or whatever the program is called, then follow the instructions to install it as desired.
|
|
1 members found this post helpful.
|
11-08-2009, 04:12 PM
|
#14
|
LQ Newbie
Registered: Nov 2009
Posts: 1
Rep:
|
Thank you
You guys are awesome.
Thanks!
|
|
|
12-31-2009, 01:25 AM
|
#15
|
LQ Newbie
Registered: Dec 2009
Posts: 5
Rep:
|
How to Run Full Tilt Poker?
Aloha All! I followed your steps masinick and got the FullTiltSetup.exe to run (I guess through WINE) and it worked great to run the .exe; however, I don't know where the file installed to from inputing 'C:\Home\Colin\FullTilt' as the location. Any ideas on where to look or how to install it to a place where I can find it? Mahalo!
|
|
|
All times are GMT -5. The time now is 06:35 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|