Intro to Unix/Linux


From Kernel to Shell:

diagram of kernel, utilities, and shell

An operating system, such as Unix or Linux, has many different levels of components. The most basic level, known as the kernel of the operating system, is made up of a library of useful, built-in functions that programs can use to interact with the system so that people don't have to write them over and over. These functions cover tasks such as opening a file, reading data from a file, writing to a file, starting a new program, etc. Built on top of this is a whole collection of stand-alone programs that use those functions, such as programs that let you copy a file (cp), or list all the files in your directory (ls), or switch to a different directory (cd). Or that tell you all the users logged in to the computer (who), or all the processes that are currently running (ps), or that provide basic file editing functionality (such as vi and emacs).


Hierarchical File System Structure:

diagram of Unix file system tree structure

Sample Filenames:

Unix / Linux has a tree-like file system. The directory at the top of the tree is called the "root directory" but it's name is just a slash (/).

Absolute pathnames always start at /:

  /Applications/Chrome
  /bin/bash
  /usr/bin/git
  /Users/abrady/CourseSites/cs230/schedule.html

If currently in /Users/abrady/CourseSites/cs230, we can use relative pathnames:

  schedule.html
  Resources/Day1/Topics.html

Relative pathnames are always relative to the current working directory.


Alyce Brady, Kalamazoo College