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
For example,
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.

  1. 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
  2. Choose the option that best suits your use case.
    OptionSteps
    Activation Codes
    1. 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.
    2. 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
    3. Navigate to the NI licensing portal.
    4. Enter the required information and the TestStand serial number. Refer to How to Find the Serial Number of My NI Software.
    5. Select the TestStand packages and versions to activate.
    6. Enter the Computer ID from the previous step.
    7. Generate the activation codes.
    8. 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
      Note

      Separate multiple activation codes with spaces.

    VLM Server Direct Checkout
    1. 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
    1. 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
    2. 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.
    3. 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/Licenses

      Copy the files into the Wine environment for the user who owns the installation.

  3. 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.