It is possible to update modules from the command line without the graphical user interface. This is useful in headless environments. Only modules which are already installed can be updated. It is not possible to install new modules. For doing this the SNAP executable needs to be configured properly. This executable is located in the bin directory of the installation folder of SNAP. The name depends on the operating system you are working with. On Unix systems it is named snap.sh
, on Mac OS X the name is snap.command
and on Windows, it depends on the bitness of your system. On a 32Bit windows system, the executable is named snap.exe
and on a 64Bit system it is called snap64.exe.
In the following commands snap
is used as a place holder for the executable file. You need to replace it with the appropriate one for your system.
Info | ||
---|---|---|
| ||
If you need to configure a Proxy, please take a look at the Configure Proxy page. |
Note | |||||
---|---|---|---|---|---|
| |||||
Currently, the commands hang after they are actually executed. You need to abort them by CTRL+C. See also SNAP-927. Many thanks to Felix Glaser. He provided a bash script to work around this problem:
|
...
snap --nosplash --nogui --modules --help
Configure Proxy without GUI
The proxy settings can be provided in a properties file. This must be located in
On Windows: <USER_HOME>\AppData\Roaming\SNAP\config\Preferences\org\netbeans
On Unix: <USER_HOME>\.snap\config\Preferences\org\netbeans
In both cases, the file must be named core.properties.
Code Block | ||||
---|---|---|---|---|
| ||||
proxyAuthenticationUsername=MyName
proxyAuthenticationPassword=MyPw
proxyHttpHost=www.samplehttp.int
proxyHttpPort=4816
proxyHttpsHost=www.samplehttps.int
proxyHttpsPort=1213
proxySocksHost=www.samplesocks.int
proxySocksPort=1214
proxyType=2
useProxyAllProtocols=true
useProxyAuthentication=true
WWWBrowser=SL[/Browsers/SystemDefaultBrowser |
...