How to run MATLAB remotely (back to Math 300 main page)

You have two options to run MATLAB installed on our adams server (

Command Line

  1. Establish SSH connection to (using PuTTY on Windows, or Terminal+ssh on Limux/macOS)
  2. Navigate to the directory you want to use as MATLAB working directory (the directory where your scripts are stored). You can also do this after MATLAB was started by running the same commands as we had in Linux: cd to change directory; pwd to show current working directory.
  3. Run the following command: "matlab -nodisplay".
  4. MATLAB is now running in "command line" mode. To quit MATLAB just type "exit" command.


This requires some addtional software called X Window Client. There is a bunch of free implementations of this software for various platforms.


  1. The X Window Client implementation for Mircosoft Windows I am suggesting you to use is called Xming. It can be downloaded by this link.
  2. Donwload the installation package using the above link and run it. You can use default options for the whole installation process, so just click "Next" button couple of times and then "Finsih".
  3. If you used deafault options in the previous step, Xming should be started automatically right after installation is finsihed. Otherwise, go to "Start" menu, find application called Xming, and start it.
  4. Now Xming is running in the background and you need to start PuTTY. Enter host name in the main widnow but do not press "Connect" button yet.
  5. Navigate to Connection -> SSH -> X11 tab using navigation tree on the left and check "Enable X11 forwarding" checkbox.
  6. Go back to Session tab (the one you have started with) using navigation tree on the left and press "Open".
  7. As soon as you are connected run the following command: "matlab &" (this will start MATLAB as a background process which is more appropriate in this case).
  8. You will not see any resut immideately, but wait a bit (it took up to 30 seconds for me) until MATLAB is started and the main window is forwarded to your desktop. Note that you will see Xming icon for MATLAB widnow in the Windows taskbar instaed of original MATLAB icon.
  9. To quit MATLAB simply close the window and close SSH session if you do not need for any other purposes.


The X Window Client implementation for macOS I am suggesting you to use is called XQuartz. It can be downloaded by this link.
Since I am not able to try everything myself I can not provided more details here.
There are dozens of online tutorials how to install XQuartz and make it work
Let me know if you need help with that!


Linux users probably know what's going on here how to execute applications remotley using X Window client/server, so I'm to giving any instructions heres. Anyway, please let me know if you need help!