SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I probably shoud be clearer. The apparent difference that I am asking about between MSDOS and Linux is that in MSDOS, you can execute a command that is not in the path simply by typing the command name, so long as that command (an exe file, say) resides in the current directory.
For example, if apache (or any program) for windows or dos was installed in C:\Apache\ and the file to run it was "apache.exe" (I have no idea what it is in reality, but that doesn't matter here), I could run that program simply by typing "apache" from the prompt at C:\Apache, regardless of whether that directory was in the path.
From my little experience with installing apache in Linux described above, it seems that this does not hold true for Linux. In other words, even if the executable file is in the current directory, I still have to specify "./" first if I want to run it.
Yes/no. Current directory is normally included in the user paths. However, for security purposes, it is NOT when logged in as root. You can easily configure it to have the current directory in the path, but it would not be recommended.
Originally posted by sugna Hmm, interesting. Sorry if I'm a bit slow, but what specifically are the 'security purposes' that you refer to?
AFAIK, having the current directory in your $PATH makes it quite possible to accidentaly execute a file located in your current directory... like, for example: i send you a tarball with 5 files... file #4 is an "evil executable" of your choice and it's called "ls"... so after untaring the file you cd to the untared directory and to see the files you type "ls" and and hit enter, which executes the evil executable...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.