Licensing TestStand on Linux
- Aktualisiert2026-07-27
- 3 Minute(n) Lesezeit
License TestStand on Linux by using an activation code generated from the Computer ID or by checking out a license from a Volume License Manager (VLM) server.
Licenses apply to a specific Wine user environment (WINEPREFIX). Run licensing commands as the Linux user who owns the TestStand installation. If you need to run the licensing command on behalf of another user, add the following arguments before your command.
sudo runuser -u <target_user> -- env TARGET_USER=<target_user> bash -c
sudo runuser -u <target_user> -- env TARGET_USER=<target_user> bash -c ' source /opt/ni-teststand-2026/constants_and_env.sh wine "$WINEPREFIX/drive_c/Program Files/National Instruments/Shared/License Manager/NILicensingCmd.exe" exportComputerId 2>/dev/null'
Replace <target_user> with the Linux user name that owns the TestStand installation. Passing TARGET_USER=<target_user> helps the environment script set WINEPREFIX for that user. The 2>/dev/null option hides Wine diagnostic messages.
-
Source the TestStand environment script. The following script sets WINEPREFIX
and makes the wine command available.
source /opt/ni-teststand-2026/constants_and_env.sh
-
Choose the option that best suits your use case.
Option Steps Activation Codes - Ensure that you have NI License Manager command-line tool (NILicensingCmd.exe) on the target machine, located at $WINEPREFIX/drive_c/Program Files/National Instruments/Shared/License Manager.
- To get the computer ID, run the following commands:
wine "$WINEPREFIX/drive_c/Program Files/National Instruments/Shared/License Manager/NILicensingCmd.exe" exportComputerId 2>/dev/null
- Navigate to the NI licensing portal.
- Enter the required information and the TestStand serial number. Refer to How to Find the Serial Number of My NI Software.
- Select the TestStand packages and versions to activate.
- Enter the Computer ID from the previous step.
- Generate the activation codes.
- To apply the activation codes, run the following
commands:
wine "$WINEPREFIX/drive_c/Program Files/National Instruments/Shared/License Manager/NILicensingCmd.exe" applyActivationCodes <activation code 1> [<activation code 2> <activation code 3> ...] 2>/dev/null
NoteSeparate multiple activation codes with spaces.
VLM Server Direct Checkout -
Run the following commands:
wine "$WINEPREFIX/drive_c/Program Files/National Instruments/Shared/License Manager/NILicensingCmd.exe" addServers <server name 1>[:<port 1>] [<server name 2>[:<port 2>] <server name 3>[:<port 3>] ...] 2>/dev/null
This command adds servers to the list that NI License Manager uses for license checkout.
Note-
For information about setting up VLM, refer to Setting up VLM - NI.
-
You may need to assign permissions to specific users or computers on the VLM server. For more information, refer to Managing Users or Computers - NI.
-
VLM Server Disconnected - Run the following command to get the Computer
ID:
wine "$WINEPREFIX/drive_c/Program Files/National Instruments/Shared/License Manager/NILicensingCmd.exe" exportComputerId 2>/dev/null
- In VLM, add a user or computer, and then assign the required license permissions and the Computer ID.Generate disconnected licenses. Refer to Managing Disconnected License Files.
- Copy the .lic files to the following
folder on the Linux machine:
$WINEPREFIX/drive_c/ProgramData/National
Instruments/License Manager/Licenses
On Linux, this path typically maps to
/home/<username>/.niwine10/drive_c/ProgramData/National Instruments/License Manager/LicensesCopy the files into the Wine environment for the user who owns the installation.
-
To deactivate a license, run the following command:
source /opt/ni-teststand-2026/constants_and_env.sh
wine "$WINEPREFIX/drive_c/Program Files/National Instruments/Shared/License Manager/NILicensingCmd.exe" deactivate <license name 1>[:<version 1>] [<license name 2>[:<version 2>] <license name 3>[:<version 3>] ...] 2>/dev/null
Note<license name> is the TestStand package name. On Linux, use TestStand_BaseDeploy_PKG to activate and deactivate the license.
You can deactivate multiple licenses in one command by specifying multiple license names and versions. If you omit a version, the command deactivates all versions for that package.
Verwandte Inhalte
- Activating and Licensing TestStand
After you install TestStand, you must use NI License Manager to activate the software or initiate the evaluation period for the software.
- How to Find the Serial Number of My NI Software
- Offline Activation Code Generator
- Setting up VLM
- Managing Users or Computers
- Managing Disconnected License Files