I've seen people mention in other answers that it's a bad idea to include the current working directory ('.') in your $PATH environment variable, but haven't been able to find a question specifically addressing the issue.So, why shouldn't I add . to my path?  And if despite all warnings I do it anyway, what do I have to watch out for?  Is it safer to add it to the end than to the the start?
Is it safe to add . to my PATH? How come?
path
If you're the only user on the machine it's OK, as long as you know what's you're doing. The general concern is that by having your current directory in PATH, you cannot see commands as a constant list. If you need to run script/program from your current directory, you can always explicitly run it by prepending ./ to its name (you saying the system I want to run this file from my current directory).Say, now you have all this little scripts all over your filesystem; one day you'll run the wrong one for sure. So, having your PATH as a predefined list of static paths is all about order and saving oneself from a potential problem.However, if you're going to add . to your PATH, I suggest you to append it to the end of list (export PATH=$PATH:.). At least you won't override system-wide binaries this way.If you're a root on the system and have system exposed to other users' accounts, having . in PATH is a huge security risk: you can cd to some user's directory, and non-intentionally run malicious script there only because you mistyped a thing or script has the same name as a system-wide binary.