Clear Filters
Clear Filters

Can Matlab Home run on a Persistent Live Ubuntu USB Stick Operating System?

6 views (last 30 days)
I anticipate moving from my MS Windows 10 OS to a Ubuntu LTS OS. In preparation for that, I am evaluating several software packages on a "Persistent Live Ubuntu LTS USB Stick Operating System". I have a Matlab Home license on my Windows 10 OS. Can I install and run my Home license on the Ubuntu USB OS?
Once I get all of the apps I need running on the Ubuntu USB OS, I will then replace the Windows 10 OS with the Ubuntu OS. I am using the same HP ZBook for both OSs. (Not at the same time, obviously.) When Microsoft stops supporting Windows 10, I will make the change. My current ZBook will not support Windows 11.
Thanks in advance for your experience and your help.

Accepted Answer

Walter Roberson
Walter Roberson on 10 Dec 2023
It is certainly possible to install MATLAB onto a removable drive, whether that drive is spinning rust, or SSD, or USB keychain drive.
If this were MacOS you were working with, then the minor issue is that when you install onto a non-default volume, the file associations are not necessarily going to be set up correctly, so to have a particular kind of file (such as .m file) automatically open in MATLAB, you might need to configure "Open with" "from now on" against the application.
If this were Windows you were working with, then file associations commonly get messed up when you install onto a drive other than C:. Oh yes, and on Windows it's pretty common for applications to expect to be able to find lots of temporary space on C: even if they are installed to a different drive, so if you were trying to configure a minimal nearly-readonly boot stick then you can run into unexpected temporary space issues
On all operating systems, you have the issue that the hardware identifiers that MATLAB looks at for licensing purposes do not include information about non-boot drives. Windows (only) can use the serial number of the boot drive (which is not necessarily the built-in harddrive or built-in SSD), but MacOS and Linux cannot do that. This doesn't mean that you cannot store the files on an external drive: it means that you cannot use an external drive as a portable MATLAB that you move between different systems.
The use-case you are describing involves always booting off of the same ZBook, and the MAC addresses of the ZBook can be the hardware keys for MATLAB purposes, so you should be fine for your purposes.
On all operating systems, you have the issue that the directories that MATLAB looks in for the user-specific license files will not typically include external non-boot drives unless you have configured the user home directories to live on the external drives. A Home license is implemented as a user-specific license file. MATLAB looks for DEMO and "dedicated host" and network licenses inside the MATLAB installation directories.
The use-case you are describing involves you booting from the USB drive, in which case your home directory is fairly likely on the same USB drive, so MATLAB would look in your ~/.matlab directory for license files (on Linux -- MacOS and Windows look in different places), so as long as your hardware identifiers matched (as described above) then you should be fine.
The issue about location of license files is that some people want to configure USB sticks (or equivalent) as portable MATLAB installations that they can move from machine to machine. I described above that there are hardware identifier issues that affect that, but in such a case there is also the issue that MATLAB is unlikely to know to look on the external drive for the per-user license files. (But this should not affect your particular use)
  13 Comments
James Prewitt
James Prewitt on 14 Dec 2023
Discovered that the HostID IS associated with the SSD drive
I first used the following command: "wmic diskdrive get model,serialNumber,size,mediaType".
It gave me serial number info that did not match the HostID
However, when I used the command: "vol c:"
It did give me a number that matched with the HostID.
Stll waiting on some coment from MathWorks on installation.
James Prewitt
James Prewitt on 15 Dec 2023
Well, I finally heard from MathWorks. They said they thought it should be OK.
I was still a little skeptical, but I proceded to download the linux installer and
follow the steps I found in one of the relatively new links I found from a google search
using the string:
"how to install matlab on ubuntu 22.04"
There was one key item that was missing in some of the procedures.
You need to create the target directory BEFORE running the "install" script.
sudo mkdir -p /usr/local/MATLAB/R2023b/
The first time I tried to install, I did not have the directory created.
The script just kept on spinning...
I killed the install script and then created the target directory.
The next time I ran the install script, I had to use my MathWorks account
information and feed it some other basic install info and...
After a LONG time, it completed successfully.
For some reason, even after indicating its completion, I waited and ...
I finally used "matlab &" command and the gui appeared as expected.
The "install" script still did not terminate.
I killed the install script with Ctl-C.
I exited matlab and then fired it up again and created a basic mFiles
to plot some points.
It was a very simple test, but I was still pleasantly surprised at the performance.
Everything seems to work OK.
I only installed R2023b.
I then Shutdown matlab and "restarted" the Ubuntu USB system.
When the UBUNTU came back up, I verified that matlab still behaved as expected.
So...IT WAS A SUCCESSFUL EXPERIMENT!!!
The zipFile, the unzipFolder, and the installed R2023b directories all together gobbled
up about 4.5 GB. I can recover some by removing the zipFile and the unzipFolder.
I can give you the actual link to the procedure I used if you are interested.
I just used the basic portion of the procedure.
Thank you very much for your help.

Sign in to comment.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!