File Exchange

image thumbnail


version (1.68 KB) by Jeff Stafford
A systemd service template for MATLAB's FlexLM


Updated 08 Apr 2021

From GitHub

View license on GitHub

A systemd service template for MATLAB's FlexLM license manager. Uploading here because it's outrageous that MATLAB doesn't include one of these by default. Hopefully it proves useful for other people too. Confirmed to work on CentOS 7.
Just copy matlablm.service to /usr/lib/systemd/system/. You need to change the User bit to a normal user on the machine in question (i.e. not root). Note that this is for FlexLM installs in /usr/local/MATLAB. If installed in a different location, change the commands for ExecStop and ExecStart to the proper locations.

To start/stop FlexLM:

sudo systemctl start matlablm
sudo systemctl stop matlablm

To start on boot:

sudo systemctl enable matlablm

Cite As

Jeff Stafford (2021). jstaf/matlablm-systemd (, GitHub. Retrieved .

Comments and Ratings (1)


It is better to copy the systemd unit file to /etc/systemd/system (where the local configuration files are stored) as opposed to /usr/lib/systemd/system, where units of installed packages reside. Refer to man 5 systemd.unit, "UNIT FILE LOAD PATH".

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!