Originally Posted by mrmnemo
ln -s /usr/local/bin /usr/local/src/my_scripts/run
You've got the command backwards. You want to create a link to each of your scripts inside /usr/local/bin
. Run ls -l
on the directory to view any symlinks that exist and the target files they point to. Read man ln
for the proper syntax on creating a symlink.
And have you confirmed that /usr/local/bin
is in your path? What does echo $PATH
Just to be perfectly clear about it, the path is simply a list of directories that the shell will check, in the order given, for the names you enter on the command line. If it finds a filename that matches the command, it will attempt to execute that file. That's it.
The file matched can be just about anything; a program, script, or link to another file, but of course only executable files will actually work. If there are no files with that name in any of the PATH directories, it will error out. If there are multiple files of the same name in the PATH, the first one found will be the one executed, meaning that the order of the directories given can sometimes be important.
If your commands aren't being found, it simply means that there are no files with that name in any of the PATH directories. So either you have the PATH wrong, or the filenames wrong.
Side note: the added path using export DOES work for that shell instance. once I close gnome-term the added path entry is gone.
That's as it should be. Settings always only apply to the current shell. If you want to make it permanent you have to add the command to one of your shell's start-up scripts so that it loads every time.
BTW, I'm pretty sure that gnome-term is
an xterm. Most console applications are basically xterm front-ends. echo $TERM
to confirm it. It shouldn't affect the behavior of your path in any case, since that's a function of the shell that's running inside the terminal.
also, I have some questions regarding the the bash.bashrc file in ubuntu. Which kinda reflects on PATH. I dont understand why the bash.bashrc file would place me ( as user not root ) in a chrooted environment. Am I not understanding what I am looking at correctly?
The answer to that would depend on the contents of your bashrc and/or perhaps the command that launches your terminal. I've never heard of Ubuntu setting up a user in a chroot by default, however.