Introduction to UNIX - Part 1: Basic Concepts
What is UNIX?
By the most simple definition, UNIX is a computer operating system - the base software that controls a computer system and its peripherals. In this sense, UNIX behaves in the same way that the perhaps more familiar PC operating systems Windows or MacOS behave. It provides the base mechanisms for booting a computer, logging in, running applications, storing and retrieving files, etc.
More specificially, the word "UNIX" refers to a family of operating systems that are related to one or both of the original UNIX operating systems - BSD and SystemV. Examples of modern UNIX operating systems include IRIX (from SGI), Solaris (from Sun), Tru64 (from Compaq) and Linux (from the Free Software community). Even though these different "flavors" of UNIX have unique characteristics and come from different sources, they all work alike in a number of fundamental ways. If you gain familiarity with any one of these UNIX-based operating systems, you will also have gained at least some familiarity with nearly every other variant of UNIX.
UNIX fundamentalsUNIX has been around for a long time (over 30 years). It predates the concept of the personal computer. As such, it was designed from the ground up to be a multi-user, shared, networked operating environment. UNIX has concepts such as Users, Groups, Permissions and Network-Shared Resources (such as files, printers, other computer systems, etc.) built-in to the core of its design. This makes UNIX a uniquely powerful and flexible operating system. Along with this power and flexibility comes some unique concepts that make UNIX what it is. These concepts are relatively simple and should be understood to take full advantage of the operating system.
UNIX ProcessesWhen a program is started on UNIX, it creates what is known as a "process" on the system. Every process is assigned a unique serial number called its process id or PID for short. Processes can be created by any user, but can only be destroyed by someone with the permissions to do so - usually the user that created the process or the system administrator. This ensures that the compute jobs you start on the system will not be disturbed by any other user of the system until they complete or you decide to stop them yourself.
Processes and process management becomes important on UNIX systems that are shared between a number of users. The concept of users and PIDs is the main tool by which the available system resources are shared fairly among everybody who needs access to them. Processes can be suspended or given lower priority in cases where one or more users should step out of the way for someone else, but wish to do so without losing their work up to that point.
One further consideration on this topic is the fact that a running UNIX process can spawn "child" processes. For example, any program you run from inside a UNIX shell will be a child process of that shell. Conversely, the shell is the parent process of this child. Child proceses have associated with them both their own process id (PID) as well as their parent's process id (PPID).
Normally this concept of parent and child processes is not something you need to be bothered with as a user. However, it can be useful to understand how UNIX organizes processes if you are trying to keep track of certain system resources (e.g. memory and CPU), if you are working with environment variables, or if you need to track down a rogue program or script. Some of these items will be discussed later so it's good to have a basic idea about what a UNIX process is.