
How to Install MATLAB on Rocky Linux 10: A Step-by-Step Guide
MATLAB is an indispensable tool for engineers, scientists, and researchers, offering a powerful environment for numerical computation, data analysis, and algorithm development. When paired with a robust, enterprise-grade operating system like Rocky Linux 10, it creates a formidable platform for demanding technical work.
This guide provides a comprehensive, step-by-step walkthrough for installing MATLAB on your Rocky Linux 10 system, ensuring a smooth and successful setup.
Prerequisites: What You’ll Need Before Starting
Before diving into the installation, ensure you have the following ready. Proper preparation is key to avoiding common installation hurdles.
- A Valid MATLAB License: You must have an active license associated with a MathWorks account. This can be an individual, university, or corporate license.
- A MathWorks Account: Your license must be linked to a MathWorks account to download the installer and activate the software.
- Sudo/Root Privileges: You will need administrative rights on your Rocky Linux system to install software and handle dependencies.
- A Stable Internet Connection: The installer downloads necessary components and validates your license online.
- Sufficient Disk Space: A full MATLAB installation with several toolboxes can require over 30 GB of disk space. Check the specific requirements for the version and toolboxes you plan to install.
Step 1: Update Your System and Install Dependencies
First, it’s always a best practice to ensure your system is fully up-to-date. Open a terminal and run the following command:
sudo dnf update -y
Next, MATLAB’s graphical installer relies on several libraries that may not be installed by default on a minimal Rocky Linux setup. The most common dependencies are related to the X Window System. You can install them with this command:
sudo dnf install libXtst unzip -y
Installing unzip
is crucial as the installer package is a ZIP archive.
Step 2: Download the MATLAB Installer
With your system prepared, the next step is to download the official Linux installer from the MathWorks website.
- Navigate to the MathWorks Downloads page.
- Log in with your MathWorks account credentials.
- Select the latest release of MATLAB you wish to install (e.g., R2024a).
- Choose the Linux installer option to begin the download. This will download a single ZIP file (e.g.,
matlab_R2024a_glnxa64.zip
). - Once downloaded, move the ZIP file to a suitable directory, such as your
~/Downloads
folder.
Step 3: Extract and Run the Installer
Now, you need to extract the installation files from the downloaded archive. Open a terminal and navigate to the directory where you saved the ZIP file.
cd ~/Downloads
Extract the contents using the unzip
command:
unzip matlab_R2024a_glnxa64.zip -d matlab_installer
This command creates a new directory named matlab_installer
containing all the necessary files. Now, navigate into that directory:
cd matlab_installer
The installer script is named install
. You first need to make it executable using the chmod
command.
chmod +x install
Finally, run the installer with administrative privileges. This is necessary to install MATLAB in the default /usr/local/
directory and create necessary system links.
sudo ./install
This will launch the graphical installation wizard.
Step 4: Follow the Graphical Installation Wizard
The MathWorks installer provides an intuitive graphical interface to guide you through the remaining steps.
- Log In to Your MathWorks Account: The first screen will prompt you to log in. Enter the email and password for the account associated with your license.
- Accept the License Agreement: Read the terms and conditions and accept them to proceed.
- Select Your License: Choose the active license you wish to use for this installation.
- Choose the Installation Folder: The default location is /usr/local/MATLAB/[version] (e.g.,
/usr/local/MATLAB/R2024a
). This is the recommended location for system-wide access. You can change it if needed, but the default is usually best. - Select Products (Toolboxes): This is a critical step. You will see a list of all available products and toolboxes covered by your license. Select only the toolboxes you need. Installing everything can consume a massive amount of disk space and extend the installation time.
- Confirm Selections and Begin Installation: The final screen will show a summary of your choices. Review them carefully and click “Begin Install” to start the process.
The installer will now download and install all the selected components. This can take a significant amount of time depending on your internet speed and the number of toolboxes you selected.
Step 5: Post-Installation Configuration
Once the installation is complete, there is one final, highly recommended step to make launching MATLAB easier. By default, you would have to navigate to the installation directory to run it. Creating a symbolic link (symlink) allows you to launch MATLAB from any location in your terminal.
Execute the following command to create a symlink in /usr/local/bin/
:
sudo ln -s /usr/local/MATLAB/R2024a/bin/matlab /usr/local/bin/matlab
Important: Remember to replace R2024a
with the specific version of MATLAB you installed.
Now, you can launch MATLAB from any terminal window simply by typing:
matlab
The first launch may take a moment as it finalizes the setup and configuration for your user profile.
Conclusion
You have now successfully installed MATLAB on your Rocky Linux 10 system. By following these steps—preparing your system, running the official installer, and creating a convenient symbolic link—you have a stable, high-performance computing environment ready for any challenge. This powerful combination of MATLAB’s analytical capabilities and Rocky Linux’s stability provides a solid foundation for your technical projects.
Source: https://centlinux.com/install-matlab-on-rocky-linux-10/