Hi. I guess this is more a linux-question than a programming question, but i put it here because other programmers will propably give the best help on this one. I'm having troubles running a c program I made after compiling. What happens is this: $ gcc filename.c -o filename $ filename filename: command not found I guess there's some sort of package i haven't installed, but I can't figure out which. Can anyone help me?
Ah, thanks. I recently installed Linux Mint, and I've earlier worked on computers with Red Hat installed, where I didn't need the ./ if I were in the correct folder. Any idea how to that works?
I haven't used mint, though I've been using Ubuntu. I guess you have to explicitly tell the shell that you want to look for the executable inside current directory. You could edit PATH variable to include . (current directory). Then you won't need ./
Unlike on Windows, Unix doesn't include the current directory. So if you want it to be able to find stuff in the current directory, you have to include . in the path.