• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux executable file help

mattg1981

Senior member
Okay .. I am a linux newb but I have to learn it for a college class I am taking. Here is my problem. At school, on their computers, I create the .c file and then run gcc on it and create the executable file (for this example, we'll call it 'example'). Then from the command line, you just type 'example' and it runs.

On my computer at home (RH9), I write the program in vi, compile it (no splint errors) and the executable is created without a problem. but when i type in 'example' to run the program, i get an error which says something like:

bash:example:no command found ... or something like that.

Can someone help me, is it a bash setting that I have to change?


also, Same problem happens when I downloaded firefox .. you should just type in firefox in the terminal (in the right directory of course) and it should run, but I get a bash:firefox:no command found ...
 
yeah ... the path was my problem ... just so you guys know and if anyone else reads this later, this is how to do it:

It depends on which shell you use, in RH9 and in FC2 .... edit your ~/.bash_profile and look for a line that says PATH=..... and add :. to the end of it

In Suse 9.1 the file is called ~/.bashrc and look for PATH again and add :. to the end of it
 
Back
Top