Paths

As was just mentioned, a path tells the shell where to look for programs that you want to execute. You might notice that if you have a copy of a program in your current directory, typing the filename sometimes results in a command not found error. This is because it's common for the path variable to lack the current directory. A good way to simulate this problem is to type the following:

					> \(-
					> (-: Command not found
				

In addition to getting a nice smiley face you can see that there is no command found for this entry. All this means is that you either don't have a path or you don't have a command. You can execute programs in the current directory by typing ./<program> or by adding the current directory to your path. The current directory ...

Get SAMS Teach Yourself Unix in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.