| The link command is ln. Use -s to create symlinks instead of hard links.
The PATH variable is an environment variable. For those of you who don't know what environment variables are, I will explain it in short:
When a process is created (such as when you log in on your system and /bin/sh is executed), the process which created it can pass it environment variables. Usually it passes the same environment variables as it has itself. An environment variable has a name and a value. The name is usually in uppercase (In this case PATH). Environment variables are mainly used for passing different kinds of information to processes, for example what the home directory of the user that runs the process is. That's passed in the HOME variable. Another common variable is the PATH variable, which specifies which directories to look for programs to execute in when no path is given for the program. The different directories are seperated by colons, and the list is checked in left-to-right order. For example, if your PATH is /usr/local/bin:/bin:/usr/bin, and you run "ls", the shell first looks in /usr/local/bin for an executable file named ls, and then when it doesn't find one, it looks in /bin, where it finds it and executes it. Some other common variables are PRINTER, which specifies to the lpr command what your default printer name is, and TERM, which specifies what kind of terminal you're currently using.
To create or change an environment variable you type this in the shell:
name=value
There must be no space between name and =, or the shell will interpret the line as a command. If you create a new one you must also run "export name". This is because the shell by default doesn't create the variable as an environment variable, but only as an internal shell variable, which in turn means that the variable will not be exported to processes started by the shell.
A good place to look in to change your default PATH is the .bash_profile file in your home directory. That file is sourced everytime bash is started. |