DocumentationHelp CenterDocumentation
Run commands in a Linux shell on the NVIDIA hardware
system(hwObj,command)
system(hwObj,command,sudo)
example
system(hwObj,command) runs a command in the Linux® command shell on NVIDIA® hardware. This function does not allow you to run interactive commands.
hwObj
command
system(hwObj,command,sudo) runs a command with superuser privileges.
sudo
collapse all
You can run a command that lists the contents of a folder.
system(hwObj,'ls -al')
ans = 'total 168 drwxr-xr-x 19 ubuntu ubuntu 4096 Aug 9 16:02 . drwxr-xr-x 5 root root 4096 Feb 3 2018 .. -rw------- 1 ubuntu ubuntu 263 Aug 13 22:33 .bash_history -rw-r--r-- 1 ubuntu ubuntu 220 May 3 2016 .bash_logout -rw-r--r-- 1 ubuntu ubuntu 3771 May 3 2016 .bashrc drwx------ 12 ubuntu ubuntu 4096 Aug 9 14:14 .cache drwx------ 14 ubuntu ubuntu 4096 Aug 9 14:14 .config drwxr-xr-x 2 ubuntu ubuntu 4096 Aug 9 14:13 Desktop -rw-r--r-- 1 ubuntu ubuntu 25 Aug 9 14:13 .dmrc drwxr-xr-x 2 ubuntu ubuntu 4096 May 6 2016 Documents drwxr-xr-x 2 ubuntu ubuntu 4096 May 6 2016 Downloads drwx------ 2 ubuntu ubuntu 4096 Aug 9 14:14 .gconf drwx------ 3 ubuntu ubuntu 4096 Aug 9 14:13 .gnupg drwxrwxr-x 3 ubuntu ubuntu 4096 Aug 9 14:25 gpucoderTX2 -rw------- 1 ubuntu ubuntu 346 Aug 9 14:13 .ICEauthority -rwxr-xr-x 1 ubuntu ubuntu 10238 Feb 3 2018 jetson_clocks.sh drwx------ 3 ubuntu ubuntu 4096 May 6 2016 .local drwxr-xr-x 3 root root 4096 Aug 9 14:06 MATLAB drwxr-xr-x 2 ubuntu ubuntu 4096 May 6 2016 Music drwx------ 3 ubuntu ubuntu 4096 Aug 9 14:13 .nv drwxr-xr-x 2 ubuntu ubuntu 4096 May 6 2016 Pictures -rw-r--r-- 1 ubuntu ubuntu 675 May 3 2016 .profile drwxr-xr-x 2 ubuntu ubuntu 4096 May 6 2016 Public drwxrwxr-x 3 ubuntu ubuntu 4096 Aug 9 16:31 remoteBuildDir -rw-r--r-- 1 ubuntu ubuntu 0 May 6 2016 .sudo_as_admin_successful -rwxr-xr-x 1 ubuntu ubuntu 39049 Feb 3 2018 tegrastats drwxr-xr-x 2 ubuntu ubuntu 4096 May 6 2016 Templates drwxr-xr-x 2 ubuntu ubuntu 4096 May 6 2016 Videos -rw-r--r-- 1 ubuntu ubuntu 2850 Feb 3 2018 weston.ini -rw------- 1 ubuntu ubuntu 57 Aug 9 14:13 .Xauthority -rw------- 1 ubuntu ubuntu 186 Aug 9 14:13 .xsession-errors -rw------- 1 ubuntu ubuntu 1178 May 6 2016 .xsession-errors.old '
You can run a command with superuser privileges.
system(hwObj,'cp /etc/network/interfaces int.copy','sudo')
Connection to a specific NVIDIA hardware board, specified as a jetson or drive object.
jetson
drive
Use the jetson or the drive function to create this connection.
Linux command, specified as character vector.
Example: 'ls -al'
'ls -al'
'sudo'
If the optional input, 'sudo', is specified as the third argument, the command is executed as super user.
Example: 'sudo'
deleteFile
getFile
openShell
putFile
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office
Get trial now