So I get system calls in the context of a C program, but my textbook doesn't really address making system calls in Terminal (on Mac OSX). Can you do these on the command line like with "commands", or is it a totally different concept? Sorry, I'm sure this is very elementary, just can't find an answer.
No, you can't perform system calls directly because the shell running under Terminal doesn't give you low level access to memory that you would need to call system calls and deal with the results. The shell's job is to make it easy for you to run whole programs. Some of these programs give you a more convenient interface to system calls and other operating system resources. For example, the
mv command gives you a pleasant interface to the
rename system call. The
ln command gives you an interface to the
symlink system calls. The built-in shell command
cd gives you convenient access to
chdir. But for the most part system calls provide services too basic to be useful for the shell to provide direct access to them.