Help - Search - Members - Calendar
Full Version: Creating Link Or Something -- Built In Command?
Linuxhelp > Support > Technical Support
robsgaming
i have a file, wget, in /usr/local/bin ... right now, i have to access it by typing that entire directory. how do i create something where i can just type wget in any directory i'm in and it will execute? i have got alias to work to do this, but is there another way?
Corey
/usr/local/bin needs to be a part of your PATH. Which is very strange because /usr/local/bin is almost automatically part of your PATH.

Here's a little more explanation:

Your PATH is a list of directories that hold your executables which means, as you said, you can go anywhere on your system and execute the commands in these directories without the full path. To add /usr/local/bin to your path, do the following:

QUOTE
export PATH=$PATH:/usr/local/bin


You should add the above line to your ~/.bashrc file so that /usr/local/bin gets added to your path at each login.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.