Format a NI Linux Real-Time Target from the Command Line (Linux Shell)

Updated Dec 22, 2023



  • CompactRIO Controller

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

I have not been able to format my NI Linux Real-Time target using NI Measurement and Automation Explorer (MAX), because MAX crashes or throws an error when attempting a format. Is there a way to format the target from the command line (Linux shell)?

Follow the steps below to reformat a NI Linux Real-Time target from the command line (Linux shell):
  1. Use NI MAX to select Enable Secure Shell Server (sshd) on the target and save settings.

Note: If for some reason the cRIO does not appear in NI MAX, and you need to format it, step 1 can be done from the Web Configuration.
  1. Put the target into Safe Mode by checking the Force Safe Mode option in the Startup Settings pictured above, or manually using one of the methods mentioned below.
  • For Embedded Devices With DIP Switches:
  1. Move the SAFE-MODE switch to the ON position.
  2. Press the RESET button to restart the device.
  • For Embedded Devices Without DIP Switches:
  1. Hold the RESET button for 5 seconds, then release it.
  2. The Status LED will begin a 3-blink pattern to indicate safe-mode.
  1. Connect to the shell on the target via SSH using a terminal emulator such as PuTTY. See Accessing the Shell on NI Linux Real-Time Devices for more information.
  2. Login with the admin account associated with the device. When asked for a password, the default option is to leave it blank, unless changed during set up.
  3. After logging in, you are now able to run commands the device.
For ARM-Based (32-bit) targets run the following commands:
nisystemformat -f -t ubifs
nisystemformat -f -c -t ubifs
For Intel-Based (64-bit) targets run the following commands
nisystemformat -f -t ext4
nisystemformat -f -t ext4 -c
  1. After cRIO is rebooted, install the required software by right clicking Software under cRIO and clicking Add/Remove Software in NI MAX as shown in this article.