• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

executables

how do i run the executables, sorry, but under windows i can type [filename] on the command prompt but on the shell can i do the same thing

$ [filename]

after compilation.
0
ogom
Asked:
ogom
1 Solution
 
IainHereCommented:
yes, but only if the have the current working directory in your PATH environment setting.

$ ./[filename]

and it says "look in the current directory".  That will work.  Another problem might be that the file is not marked as being executable (Linux does not use *.exe for this purpose).  If you're still having problems, then this can be fixed by

$ man chmod
to find out what you're doing, then
$ chmod a+x ./[filename]

To add the current working directory to your path, try
PATH=.:$PATH


0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now