Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
1. The single dot is a shorthand for the name of the current directory that you're in. Think of it as a stand-in for the name of the directory you're in without the trailing slash. (Type "pwd" at the command prompt to print your current "working" directory).
2. The system maintains a list of directories where it will search for executable files such as programs, like "gimp" for example, or for scripts like "configure". To see where the system will look, type "echo $PATH" at the command prompt.
3. If more than one copy of a program or script exists within these directories, then the first one encountered in the list will be the one that is executed. For example, "configure" scripts are found in many locations. The one that gets run may not be the one that you had intended.
4. Unlike DOS, Linux does not automatically look into your current directory for an executable unless a dot "." happens to be in your PATH. For security reasons some people think it's a bad idea to add the current directory to a PATH statement. (This is beyond me. I read it in a book).
So to answer your question, placing "./" in front of a program or script name is simply a safeguard to ensure that the program that you end up running is the one that you're probably looking at right now in your current directory and not some similarly named program residing in a directory somewhere upstream in your PATH.