LinuxQuestions.org
Review your favorite Linux distribution.
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 12-11-2002, 10:37 AM   #1
isaacais
LQ Newbie
 
Registered: Dec 2002
Location: Austin, TX
Posts: 3

Rep: Reputation: 0
Running a C program


Hi,

I am trying to execute some C code on my linux account. After compiling, an a.out file is generated. When I enter a.out again, the message returned is:
"
sh: a.out: command not found "

I was under the impression that this is what is necessarry for running a C program on linux.

Does anyone know what I'm doing wrong?

Isaac

 
Old 12-11-2002, 10:43 AM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
try ./a.out
It is explained by PATH environment virable
 
Old 12-11-2002, 01:43 PM   #3
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
yes. your current directory is not in the path like windows,
so the . means current directory. If you do decide to
add the current directory to your path, which people will
tell you not to do, at least add it at the end, not the beginning
of your path. that would be some thing like :.
 
Old 12-11-2002, 02:22 PM   #4
isaacais
LQ Newbie
 
Registered: Dec 2002
Location: Austin, TX
Posts: 3

Original Poster
Rep: Reputation: 0
Thank You
 
  


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
Running a program LinAck Linux - Newbie 1 07-02-2005 02:17 AM
running a program from within QT kooshball Programming 4 06-14-2005 05:08 PM
Running a program rj686 Linux - Software 16 10-10-2004 07:19 PM
need help running a program boogerman Linux - Software 8 11-24-2003 02:17 PM
Running a new program bananaman Linux - Newbie 4 04-08-2003 04:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:16 AM.

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
Open Source Consulting | Domain Registration