Main Content

Start MATLAB on Linux Platforms

To view supported Linux® distributions, see Linux System Requirements.

To start MATLAB® at the operating system prompt on Linux platforms, call matlab from the bin folder in which you installed MATLAB. For example, if you installed MATLAB R2024b in the default installation folder, then type:

/usr/local/MATLAB/R2024b/bin/matlab

If you set up symbolic links during the installation procedure, then type matlab from the folder you specified.

After starting MATLAB, the desktop opens. Desktop components that were open when you last shut down MATLAB reopen. If the DISPLAY environment variable is not set or is invalid, then the desktop does not display.

MATLAB automatically adds the userpath folder to the search path.

To customize startup, see Specify Startup Options.

The MATLAB startup folder is the folder you are in when you get the MATLAB prompt. To change the default startup folder, see MATLAB Startup Folder.

If you have trouble starting MATLAB, then see Installation and Licensing.

Startup Folder

On Linux platforms, the default startup folder is the folder from which you started MATLAB.

To specify the userpath as the startup folder, set the value of the environment variable MATLAB_USE_USERWORK to 1 before startup. By default, userpath is userhome/Documents/MATLAB. To specify a different folder for userpath, and for other options, call the MATLAB userpath function.

Execute MATLAB Script from Remote ssh Login

To execute a MATLAB script hello.m via a remote ssh login, in a terminal window type:

ssh local.foo.com matlab -nodisplay -nojvm < hello.m 

The ssh command pipes hello.m to MATLAB running on the remote host local.foo.com. The -nodisplay option starts MATLAB without the desktop.

See Also

| | |

Related Topics