The Structure of Macintosh, Windows, Linux, and NetBSD Operating Systems.

Introduction

This document compares the organization and administration of the Macintosh, Windows, Linux, and NetBSD operating systems. For each operating system, I describe the arrangement of files, how system services and applications are installed and controlled, and how the user interacts with the system.

This document is not finished yet.

Macintosh OS 9

Operating System

All operating system files are stored in a directory ("folder") called System Folder. The System Folder contains the files System, Finder, System Resources, Mac OS ROM, and Classic, as well as several more folders:

Apple Menu Items
The items in this folder define the contents of the "Apple" menu at the left edge of the screen. The user can configure this folder any way he wants. The standard installation contains several useful accessory programs as well as links ("Aliases") to the Control Panels folder.
Control Panels
The items in this folder are little programs. They present simple dialog boxes whose settings define the operating parameters of various system services such as the cluck and calendar, mouse, network, and file sharing. Upon startup, the operating system loads files found in this folder.
Extensions
This folder contains device drivers and system extensions for such services as file sharing, an HTTP server, and QuickTime, a multimedia presenation system. Upon startup, the operating system loads the drivers found in this folder.
Fonts
Any fonts the user wish to use are simply moved to this folder.
Preferences
Applications store their settings in this folder.
Startup Items
Upon startup, the operating system opens any items found in this folder. Applications are launched and sounds or QuickTime movies are played.
Shutdown Items
Before shutdown, the operating system opens any items found in this folder. Applications are launched and sounds or QuickTime movies are played.

To install a new system service, the user simply drags the icon representing it to the System Folder. The operating system automagically determines where it belongs and places it in the correct subfolder. To uninstall a system service, the user removes the appropriate files from the system folder or subfolder and restarts the system. Utilities have been written to present this behavior in an even more user-friendly manner.

Applications

Applications can live anywhere in the file system as long as files they are dependent on are in the expected places. A common strategy is to maintain an "Applications" folder, into which a separate folder for each application is placed. If this becomes too ungainly, the Applicaitons folder can be organized anyway the user likes; typically applications are organized by purpose.

Volumes

Each mounted volume, whether a hard disk, removable medum, or networked volume, appears as an icon on the desktop.

Symbolic links, or aliases, can be used to make an application, file, folder, or volume appear somewhere else. For instance,

Macintosh OS X

Operating System

Important system settings are accessed through an applicaiton called "System Settings," which performs the same function as the Control Panel of the Classic Mac OS. This is where the user sets such system properties as display resolution, network settings, mouse tracking speed, and file sharing. any system service such as file sharing or FTP or HTTP serving can be controlled from System Settings.

In the Applications/Utilities folder there is an application called Terminal. This provides command-line access to the computer through a standard Unix shell.

Applications

 

Volumes

At the top level of the main hard drive are four folders:

Applicatons
This folder contains applicatons, which act like applicaton icons but are actually folders which contain all the application components. instaling an application is as simple as dragging the application to this folder. (Frequently, an applicaiton's installer will also copy some preference files to other places.)
Library
Contains system-level settings and preferences files as well as sounds, fonts, browser plug-ins and so forth.
System
Contains the operating sytsem's files.
Users
Contains a folder for each user set up on the system.

The user folders in turn contain a set of standard folders:

Documents
Intended for text documents.
Library
Contains settings and preferences files for this user.
Movies
Intended for QuickTime movies and iMovie files.
Music
Intended for MP3 and iTunes files.
Pictures
Intended for images and iPhoto files.
Public
Published though the systems FTP server (ftpd).
Sites
Published through the system's HTTP server (httpd - Apache).

User Interface

OS X has a refinement of the WIMP (widnows, icons, menu, pointer) interface it popularized with the original Macintosh in 1984. Menu A single menu across the top of the screen has standard menu titles (Apple) - system status and commands (Applicaton) - about, prefeences, show/hide, quit File - New, open, close, save, print Edit - undo, redo, cut, copy, paste, select all, find, speech, spelling The remaining items are customized for each applicaton. The last two application-menu items are generally Window - to select any specific window and bring it forward even if it is hidden Help - to invoke the Help system At the right edge of the menu are additional items such as (volume) - to control the loudspeaker volume (date) - to show a calendar and clock. Dock This takes the place of the previous (Classic) Mac OS's Apple menu. It holds icons for frequently-used applicatons and for all currently active applications. When an applicaiton is active, it has a black triangle.

 

Windows 98

Operating System

 

Applications

 

Volumes

 

Red Hat Linux

Linux is available in many distributions, such as Red Hat, Mandrake, SuSe, and Yellow Dog. This describes the Red Hat and Yellow Dog distributions. Others may have slight differences in organization. This is about Red Hat and its derivatives.

Operating System

Operating system configuration files are stored in a directory called /etc. /etc contains a large number of files and directories, each with its own purpose. Configuring the system involves editing these files and creating the correct symbolic links. Configuration files are always in text format and are editable by any standard text editors. A few files are complex enough that they should only be modified by specialized programs, but this is the exception.

/etc/hostname
the completely specified network name of the computer ("host").
/etc/exports
the names of directories made available over the network to other hosts via NFS, the names of the computers which may access them, and the permissions those hosts see.
/etc/fstab
how filesystem directories are mapped onto partitions of hard drives.
/etc/ftpaccess
who may connect to the host via ftp.
/etc/group
the names and group-membership of real and virtual users of the host.
/etc/hosts
maps host.domain names to ip addresses.
/etc/inetd.conf
configures which network services the host is to run
/etc/inittab
how the system should initialize itself and specifies whether the system should start with just a command line interface or with the X Windows system.
/etc/named.conf
connections between the local Domain Name System and ones the host depends on
/etc/passwd
names of users, their home directories, and their encoded passwords
/etc/rc
script which runs at startup.
/etc/shells
List of acceptable shells for logging in with a password.
/etc/syslog.conf
where various system messages are logged
/etc/X11/
configuration files for the X Windows system
/etc/rc.d/
directories with symbolic links to programs to be executed at various stages of system boot and shutdown
/etc/rc.d/init.d
scripts to be executed at system startup and shutdown time
/etc/rc.d/rc3.d/
symbolic links to scripts to be executed when the system is booted into terminal mode
/etc/rc.d/rc5.d/
symbolic links to scripts to be executed when the system is booted into X Windows mode
/etc/rc.d/rc6.d/
symbolic links to scripts to be executed when the system is to be shut down

The files in the various /etc/rc.d/rcN.d/ directories are given a K or S prefix to indicate whether that service is to be killed or started and a number to indicate what order the services are to be started or killed. Each file is actually a symbolic link to a script, typically in /etc/rc.d/init.d. The on startup, the system traverses the appropriate directories and calls each script in order with the appropriate Kill or Start command.

Applications

System applications live in /sbin. Aplications live in /bin.User applications live in /usr/bin/.

Volumes

Hard disk partitions, removable media, and network volumes are represented as subdirectories of a single filesystem. Typically, removable media and network drives are mounted to become subdirectories of /mnt. When a directory has a volume mounted over it, it disappears and is replaced by that volume.

The top-level of the filesystem generally contains these directories:

/bin/
basic executable files available to any user
/dev/
virtual files which represent i/o devices
/etc/
system configuration files, described in the "Operating System" section.
/home/
directories belonging to users
/lib/
shared code libraries
/mnt/
directories which serve as mount points for removable media or network volumes
/proc/
virtual files whick represent running processes. Processes may communicate to other processes by writing to these "files."
/root/
the home diretcory of root, the user with God-like privileges for the system.
/sbin/
executable files intended for use by system administrators
/tmp/
temporary files
/usr/
executable files belonging to users including the executables for the X Windows System and documentation files ("man pages").
/var/
something

 

BSD

BSD systems come in many varieties, including NetBSD, FreeBSD, and OpenBSD.

Operating System

Operating system configuration files are stored in a directory called /etc. /etc contains a large number of files and directories, each with its own purpose. Configuring the system involves editing these files and creating the correct symbolic links. Configuration files are always in text format and are editable by any standard text editors. A few files are complex enough that they should only be modified by specialized programs, but this is the exception.

/etc/myname
the completely specified network name of the computer ("host").
/etc/exports
the names of directories made available over the network to other hosts via NFS, the names of the computers which may access them, and the permissions those hosts see.
/etc/fstab
how filesystem directories are mapped onto partitions of hard drives.
/etc/ftpaccess
who may connect to the host via ftp.
/etc/group
the names and group-membership of real and virtual users of the host.
/etc/hosts
maps host.domain names to ip addresses.
/etc/inetd.conf
configures which network services the host is to run
/etc/myname
the name of the host
/etc/mygate
the ip address of the gatewayls -la
/etc/named.conf
connections between the local Domain Name System and ones the host depends on
/etc/passwd
names of users, their home directories, and their encoded passwords
/etc/rc
script which runs at startup.
/etc/rc.conf
script
/etc/rc.local
script
/etc/rc.securelevel
script which runs at startup to prepare the system entering securemode.
/etc/rc.shutdown
script which runs at system shutdown time
/etc/rc.vpn
script which configures a Virtual Private Network.
/etc/rc.conf
erfr
/etc/shells
List of acceptable shells for logging in with a password.
/etc/ssh_*
files that configure SSH, the Secure Shell protocols.
/etc/syslog.conf
where various system messages are logged
/etc/X11/
configuration files for the X Windows system

 

Applications

 

Volumes

Hard disk partitions, removable media, and network volumes are represented as subdirectories of a single filesystem. Typically, removable media and network drives are mounted to become subdirectories of /mnt. When a directory has a volume mounted over it, it disappears and is replaced by that volume.

The top-level of the filesystem generally contains these directories:

/bin/
basic executable files available to any user
/dev/
virtual files which represent i/o devices
/etc/
system configuration files, described in the "Operating System" section.
/home/
directories belonging to users
/mnt/
directories which serve as mount points for removable media or network volumes
/root/
the home diretcory of root, the user with God-like privileges for the system.
/sbin/
executable files intended for use by system administrators
/usr/
executable files belonging to users including the executables for the X Windows System and documentation files ("man pages").
/var/
var

The Structure of Macintosh, Windows, Linux, and NetBSD Operating Systems.
Michael Roeder. Revised 20020831
URL: http://www.sonic.net/~mroeder/operating-system-structure.html
Home: http://www.sonic.net/~mroeder/index.html