I am a rookie using Linux system.
Before running the matlab every time, I must go into that directory first, which is usr/local/matlab/r2011a/bin.
Is there a solution for me so that i can type “./matlab” directly under my root directory which begins with my user name?
Thanks a lot~
You can create a symbolic link. Try this command in your home directory:
ln -s /usr/local/matlab/r2011a/bin/matlab
Verify the link has been created using the ls command and try running matlab the way You wanted.
No problem. Glad I could help.
If you look at your path, you will see that you have a bin directory. If you put the link there, then all you would have to do is type matlab.
dave@Hagar:~> echo $PATH
With a link in your home directory, you need to ensure that is where you are at in order to do ./matlab. Or you would have to use a full path, /home/user/matlab.
If the program is in a directory that is in your path, you just type its name.
If you have a .bashrc or .profile in your home directory, you could add the matlab directory to your path instead.