MATLAB Installation and Setup on Arch Linux

On Arch Linux, the MATLAB installer often crashes with a Segmentation fault (core dumped). In practice, this kind of crash could be caused by many reasons, one of which is that the libraries in Arch are too new.

Instead of downgrading system libraries on the host, it’s much safer to run the installer inside a containerized environment using Distrobox. This gives MATLAB a more conservative runtime without polluting the Arch system, while still sharing your home directory and display session with the host.

Prerequisites

Ensure you have distrobox and a container engine (Podman or Docker) installed on your Arch host:

1
sudo pacman -S distrobox podman

Create the MATLAB Environment

We’ll use Ubuntu 22.04 as the guest OS:

1
2
distrobox create -n matlab --image ubuntu:22.04
distrobox enter matlab

Inside the container, install the essential softwares and libraries:

1
2
3
4
5
6
sudo apt install -y \
xfce4-terminal xterm \
dbus-x11 \
libgbm1 libasound2 libnss3 libxtst6 libpulse0 \
libgl1-mesa-dri libgl1-mesa-glx \
fonts-noto-cjk fonts-ubuntu

Installation

  1. Download the MATLAB Linux installer from the official MathWorks portal.
  2. Extract the .zip in your downloads folder.
  3. From inside the container, navigate to that folder and run the installer:
1
./install

Follow the GUI prompts. Since Distrobox shares your X11/Wayland session, the installer window will appear natively on your Arch desktop.

Desktop Integration

If you don’t want to open a terminal to launch MATLAB every time, create a desktop entry at ~/.local/share/applications/matlab.desktop:

1
2
3
4
5
6
7
8
9
10
[Desktop Entry]
Name=MATLAB
GenericName=Technical Computing
Comment=Run MATLAB inside Ubuntu container
Type=Application
# Replace <matlab_path> with your actual path
Icon=<matlab_path>/bin/glnxa64/cef_resources/matlab_icon.png
Exec=distrobox enter matlab -- <matlab_path>/bin/matlab -desktop
Categories=Science;Education;Development;
Terminal=false

Note: Ensure the Exec path points exactly to where you installed MATLAB


MATLAB Installation and Setup on Arch Linux
https://xxiaoa.github.io/posts/4964769d/
Author
XXiaoA
Posted on
February 25, 2026
Licensed under