Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 5 down vote accepted

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 link and 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.

share|improve this answer
makes sense. thanks. – Marty Feb 6 '12 at 7:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.