I'm trying to run an executable file in my current directory on Linux, but I've noticed that I can't just type the name of the file, like 'myApp'. Instead, I have to use './myApp'. Why is that the case?
1 Answer
Linux doesn't automatically check your current directory for executables. When you just type 'myApp', the system doesn't recognize it because it's searching in a set of directories defined in the PATH variable instead. To run your application directly, you specify './' which tells the system you're talking about the program in the current directory. It's like saying, 'Hey, run this specific file here!'

Why doesn't Linux just look in the current directory automatically like some other systems?