0

I have idea about alias and ln -s and PATH. Recently, i had some issue once I installed some softwares in my Debian box. While I tried to start the program, it says No such file or directory (in console).

So, I just found the bin path of that application and created softlink to /usr/bin/. Then it works fine.

And I just tried to do the same with setting up alias name to that bin file and Works fine.

And same with by adding this bin path to PATH variable. And everything works fine (Anyway, only one option is fine for me).

Is there any specific difference When do I need to use what? Am I violating anything?

1

They're entirely different things, though in this case they can be used for similar purposes.

This:

alias appl="/Applications/path/to/bin/appl"

creates an alias, so that typing appl on the command line is equivalent to typing /Applications/path/to/bin/appl.

ln -s, on the other hand, creates a symbolic link in the file system. A symbolic link is a reference to another file, and for most purposes it can be treated as if it were the file itself. It applies to anything that accesses it, not just to the shell, it's immediately visible to all processes running on the system, and it persists until it's removed. (A symbolic link is implemented as a small special file containing the name of the target file.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.