-1

I have created a symbolic link to my Matlab installation path in my home directory, so that I can type matlab and run it from anywhere, instead of typing out the entire path.

ln -s /exp/comm/matlab-R2014b/bin/matlab matlab Adding permissions to execute this: chmod +x matlab

However, I am always required to type ./matlab instead of matlab for this to execute. Is there any way to get rid of ./ and just type the name of the symbolic link and have it run correctly?

AruniRC
  • 5,070
  • 7
  • 43
  • 73

1 Answers1

1

You have a variety of options:

  1. add the directory with the symlink to your PATH. See Adding a directory to PATH in Ubuntu Also, try not put the . in your PATH. https://superuser.com/questions/156582/why-is-not-in-the-path-by-default explains why this is bad.

  2. use an alias as described by how to create a path alias?

  3. create a shell function such as seen in Unix Bash Alias Command

  4. implement your own shell

Community
  • 1
  • 1
chicks
  • 2,393
  • 3
  • 24
  • 40