On my last UNIX setup, I was able to simply type a binary’s name if I was in the same directory and it would execute it. However on this new setup, I have to preface binary names with ./ if I want to execute them. Anyone know how to circumvent this?
Thanks.
The conventional way to address this (and probably the way it was done on your previous setup) is to add
.to yourPATHenvironment variable. So if yourPATHis/usr/bin:/bin, then add.to the end (along with the:separator) so you have/usr/bin:/bin:.. Exactly how to do that varies by shell. A quick Google will no doubt get you the answer for your shell.Do be aware that there are potential negative security implications to that, though, especially on a shared service. If an attacker manages to get an evil file in a directory where you are, and to name that file a normally-innocuous command (like
ls), they could cause you to unintentionally run the evil file.For this reason, if you are going to do this, at least make sure you put
.as the last item in yourPATH.