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 12-11-2002, 10:37 AM   #1
LQ Newbie
Registered: Dec 2002
Location: Austin, TX
Posts: 3

Rep: Reputation: 0
Running a C program


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?


Old 12-11-2002, 10:43 AM   #2
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
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,288

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
LQ Newbie
Registered: Dec 2002
Location: Austin, TX
Posts: 3

Original Poster
Rep: Reputation: 0
Thank You


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:45 PM.

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