How to install NoMachine from the command line on Mac
This article only applies to NoMachine 4 and later versions. If you wish to install any of the NoMachine packages from command line, for example because you are installing from remote by SSH, you can use instructions below.
From an xterm or similar, move to the directory where you have downloaded the NoMachine package you want to install.
Mount the disk image, e.g. a NoMachine Enterprise Server dmg package:
$ hdiutil mount nomachine-enterprise-server_version.dmg
Now, you should have a "NoMachine Enterprise Server" directory in your /Volumes directory. Move there:
$ cd /Volumes/NoMachine Enterprise Server/
and execute as privileged user the following command to install the package:
$ sudo installer -pkg NoMachine.pkg -target /
If you want to uninstall NoMachine from the command line, just run:
$ sudo rm -rf /Applications/NoMachine.app
