Hi
I have installet Matlab on /My_user/Programs/Matlab and the executable matlab file is /My_user/Programs/Matlab/bin/matlab . I want to create a "command" to execute Matlab from the terminal but I don't know how. I already tried to use "ln -s /complete-route/ matlab " but when I write "matlab" nothing happens. I know maybe this is a very newbie question but I'm stuck
I'm also want to create a launcher for matlab in my desktop but when I try to open it says "Broken Link" but I'm sure I wrote the correct adress
Thanks
How to create a link to execute Matlab from terminal
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
How to create a link to execute Matlab from terminal
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to create a link to execute Matlab from terminal
Moving this here as this isn't a tutorial but a support request.
If you want to run a file in your current directory, you have to precede it with "./" to make clear the file should not be search for in the path but in the current directory. So if you have created a symbolic link to matlab, run it from the directory where you have that symbolic link with:
If you want to run a file in your current directory, you have to precede it with "./" to make clear the file should not be search for in the path but in the current directory. So if you have created a symbolic link to matlab, run it from the directory where you have that symbolic link with:
Code: Select all
./matlab
Re: How to create a link to execute Matlab from terminal
Remember: almost all varieties of Linux are case-sensitive!
You're speaking about Matlab and matlab, so check that first.
You're speaking about Matlab and matlab, so check that first.
&I have installet Matlab
ln -s /complete-route/ matlab
Re: How to create a link to execute Matlab from terminal
Sorry, this topic is a bit old but I believe the proper way to run such things from the command line, or at least an easy one, is with aliases.
An alias is a simple command substitution done by the bash command prompt, you only have to type alias matlab='/my/path/bin/matlab'
I use just a few aliases for little stuff I would otherwise type all over again but don't need to be in a script at all.
These go in ~/.bashrc (source .bashrc reloads it)
also I have a shorthand alias cd..='cd ..', because it's one space less to type and worked in DOS/Windows
An alias is a simple command substitution done by the bash command prompt, you only have to type alias matlab='/my/path/bin/matlab'
I use just a few aliases for little stuff I would otherwise type all over again but don't need to be in a script at all.
These go in ~/.bashrc (source .bashrc reloads it)
also I have a shorthand alias cd..='cd ..', because it's one space less to type and worked in DOS/Windows