Managing User Environment Variables
77
This assigns the original
PATH
variable plus the
/root/newhackingtool
directory to the new
PATH
variable, so the variable contains everything it did
before, plus the new tool directory.
If you
examine the contents of the
PATH
variable again, you should see
that this directory has been appended to the end of
PATH
, as shown here:
kali >
echo $PATH
/usr/local/sbin:usr/local/bin:/usr/sbin:/sbin/bin:/root/newhackingtool
Now you can execute
newhackingtool
applications from anywhere on
your system, rather than having to navigate to its directory. The bash shell
will look in all directories listed for your new tool!
N O T E
Adding to
PATH
can be a useful technique for directories you use often, but be careful
not to add too many directories to your
PATH
variable. Because the system will have to
search through each and every directory in
PATH
to find commands, adding a lot of
directories could slow down your terminal and your hacking.