LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 01-21-2005, 08:48 PM   #1
peterstudent
LQ Newbie
 
Registered: May 2004
Location: Germany, Berlin
Posts: 2

Rep: Reputation: 0
command not found


Hi,

I'm really a newbie because I just installed linux. I need it because we use fortran at university. I compiled just some files and called the program 'strasse'. When I enter 'strasse' to start the program linux answers with:
bash: strasse: command not found.
What's my problem? How can I start the program?

Thanks
 
Old 01-21-2005, 08:59 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You need to tell the computer where the file is. Assuming you're in the same directory, you can do that with:
Code:
./strasse
You have to do that unless the program is in a directory listed in your PATH environment variable. To see what your PATH is, execute this:
Code:
echo $PATH
 
Old 01-21-2005, 08:59 PM   #3
kvedaa
Member
 
Registered: Mar 2004
Location: Virginia
Distribution: PacketProtector
Posts: 331

Rep: Reputation: 30
Well, it would seem that you cannot run the file because it is not in your path.

By that I simply mean the computer does not know where to look for it. If you are in the same directory as your compiled program, you will first want to ensure that the file is executable. To do a listing of the program with its permision, try:

ls -l

in the list look for your program, you should see permisions...

r - read
w - write
x - execute

If the permision is missing for a given file a '-' will act as a place holder. If you do not have 'x' for the file you will need to add the exectuable permision, one way to do this is to...

chmod +x strasse

after this re-run the listing command...

ls -l

You should now see the 'x' permision in three places (a story for a diffrent day).

Now lets try to run the program. Before the file you wish to run place a dot & slash to signify that you want to run the file in the current directory, such as...

./strasse

This should avoid the problem of the computer not finding your file.

Good luck.
 
  


Reply


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
command not found murshed Linux - Newbie 8 11-22-2007 05:51 AM
bash: <command name> command not found smash Programming 5 03-13-2006 09:48 AM
command not found ginda Linux - General 3 07-16-2005 05:15 PM
Command not found nfis Linux - Software 9 11-26-2003 12:00 AM
command not found jkp Linux - Newbie 3 01-21-2003 03:26 PM


All times are GMT -5. The time now is 11:08 PM.

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