Lei Lei - 4 months ago 20
Linux Question

Run Matlab in Linux without graphical environment?

I am going to run a Matlab program in a remote Linux server using SSH.
I was wondering how to run Matlab in Linux with only command line, which means there is no graphical environment?

Thanks.

Answer

Start MatLab with the the following flags

matlab -nodesktop -nojvm -nosplash
  • -nodesktop prevents the desktop

  • -nojvm prevents starting of the java virtual machine

  • -nosplash prevents the start-up splash screen.

Note, that, as Li-aung Yip noted in the comments, Mathworks does not recommend to use the -nojvm flag.