The MATLAB system command is used to run the operating system commands from within the MATLAB command line and return the output. You can pass the OS command that you want to execute to the system command and get the output stored in a variable.
Other way of running commands is using the '!' operator. You can type the OS command that you want to run and prefix the whole command with '!' operator.
Please refer to the this link for getting more information on using 'system' and '!'.