Main Content

system

Run command in Linux shell on SoC board

Since R2022a

    Description

    example

    result = system(p, command) runs the system command specified in a Linux® shell on a connected SoC board.

    Examples

    collapse all

    Create a hardware processor object to connect to a Xilinx® SoC board. You can use the object to perform basic Linux shell operations on the SoC board.

    Create a Xilinx processor hardware object and connect to the processor on-board the Xilinx SoC board.​

    p = xilinxsoc('192.168.1.101', 'root', 'root');

    Run the uname command in a Linux shell on the SoC board by using the xilinxsoc object function system.

    system(p, 'uname')
    ans =
    
       'Linux'

    Input Arguments

    collapse all

    Hardware processor object that represents the connection from MATLAB® to the processor on a specific SoC hardware board, specified as a xilinxsoc object or intelsoc object. This connection allows the function system to send system commands from MATLAB to the hardware board.

    Linux shell command that you want to run on your SoC board. You can run multiple different Linux system commands, such as listing files in a directory, displaying information about the system, or creating a new directory.

    Example: 'ls -al'

    Example: 'uname'

    Output Arguments

    collapse all

    Output of the system command run in the Linux shell on your connected SoC board. If there is no output based on the system command you run, result is an empty character vector.

    Version History

    Introduced in R2022a

    See Also

    Objects

    Functions