Main Content

Startup and Shutdown

Startup command line flags, startup and shutdown files

Caution

Best practice is to run MATLAB® only as a privileged user whenever elevated privileges are specifically required. A privileged user refers to the root user on Linux® and Mac, or an administrator on Windows®.

Functions

expand all

matlab (Windows)Start MATLAB program from Windows system prompt
matlab (macOS)Start MATLAB program from macOS Terminal
matlab (Linux)Start MATLAB program from Linux system prompt
batchStartupOptionUsedDetermine if MATLAB started with -batch option
quitTerminate MATLAB program
exitTerminate MATLAB program (same as quit)
startupUser-defined startup script for MATLAB
finishUser-defined termination script for MATLAB
matlabrcSystem administrator-defined startup script for MATLAB

Topics

Troubleshooting

Recovering Data After Abnormal Termination

Techniques for recovering information if MATLAB terminates unexpectedly.

Crash Reporting

Sending crash reports to MathWorks®.

When MATLAB Terminates Unexpectedly

Using MathWorks Crash Reporter and Crash Analyzer to report an internal error.

Specifying Java Startup Options

You can specify custom Java® startup options by creating a java.opts file.

Associate .mat Files with MATLAB

To associate a .mat extension type with MATLAB, use Microsoft Windows Default Programs.

Remove canberra-gtk-module and pk-gtk-module Messages

How to remove canberra-gtk-module and pk-gtk-module messages at startup.