Shutdown NI Linux Real-Time Devices Programmatically

Updated Mar 17, 2021



  • CompactRIO Controller
  • PXI Controller

Operating System

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


  • NI Linux Real-Time targets

How can I shutdown NI Linux Real-Time devices via software commands?

There are several ways to shut down your device.
  • You can use the Call Library Function node to call into a standard installed library glibc on your Linux Real-Time device. The version of this library may change in different LabVIEW releases so be sure to point to the that is on your device.  An example VI of how to structure your shutdown VI is attached and will look like:

The command 4321FEDC is to shutdown the device.

If you are using a cRIO, you can check the file that is on your device, by accessing files > as shown below. 

To see how to access files on your device, refer to: Using WebDAV to Transfer Files to Real-Time Target /sbin/shutdown -P -h now

More information about the options used in this command can be found here.

Additional Information

Because of the flash-based hardware on NI Linux Real-Time devices, it is highly recommended to shutdown the device before loss of battery power. You can refer to Under the Hood of NI Linux Real-Time  for more information on how to access the Linux Real-Time command line via LabVIEW.