Introduction to Unix - The Basics
The History of Unix
- Developed by Dennis Richie and Ken Thompson, Bell labs, 1970
- Based on a system called MULTICS (Multiplexed Information and Computing Service), Unix was born in the early years of the
- Dennis Ritchie and Ken Thompson created unix with the mindset of wanting a powerful operating system that would play off of
the idea of MULTICS: allowing multiple users access to a machine simultaneously, while adding some powerful tools such as
a hierarchical file system, command line use, and other programs accessible to the users. The goal in all of this, was to create
a system that was usable by many people at once, while keeping everyone's processes seperate, and allowing everyone's processes
to share computing time given by the machine. Unix was born.
- Dennis Richie may be a name that is familiar to some, as he is known as the father of the C Programming language.
Basic Computer Components:
What does it all do? How does it all work together?
Have you ever built your own computer? If you have not and you're going into Computer Science, I highly suggest it (It's like legos for grown-ups!).
There are different pieces and parts of your computer that all work together to form one working machine. The key parts are listed below:
All of the items above are hardware components of the computer. Luckily for the user, normally they do not give commands directly to the
pieces of hardware. This is where the idea of an Operating System comes in. The operating system is not only a middle-man between the user
and the hardware, but also between the software (programs on the computer) and the hardware.
The user can interact directly with the operating system which will in turn "talk" to the hardware, or the user can interact with software that is
installed to work properly with the appropriate operating system (which in turn then talks to the hardware if needed).
- CPU - The Central Processing Unit. The "brain" of the computer.
- RAM - Random Access Memory. Volitile memory, physically close to the CPU. Not long term storage
- I/O Devices - Keyboard, Screen, Printer
- Secondary Memory Devices: harddrives, USBs, CDs, DVDs, floppy discs (blast from the past!)
- ALU - Arithmetic Logic Unit. Performs mathematical and logic calculations.
Vareties of Unix
Ever used a unix based machine before? I'll bet you have...
There are many current commercial usages, personal usages, and deployments of unix based Operating Systems used today.
Some popular and widely used systems that run unix/linux variants are:
There are other distributions of Unix based Operating systems that are available for your computer system like: Ubuntu, Debian, Fedora, etc.
- Android OS
- Chrome OS
- Playstation 2
Shells vs. Machines
What's the difference?
In this class, we will be accessing unix based machines (physical computers) that are located in Carothers hall. You'll use your ssh software (like
ssh secure shell or another client if you choose) to log into these machines. Examples of some machines that the FSU computer science department
has that are available for use are:
When you log on to any of these machines, you'll then be utilizing a SHELL to interact with the machine you're logged in to. A SHELL is the
middle-man between you (the user) and the kernel of the machine you're logged in to.
- linprog.cs.fsu.edu (there are 4 linprog systems, linprog1, linprog2, etc. If you log into "linprog.cs.fsu.edu", you'll randomly be placed
one of the four linprog machines
- shell.cs.fsu.edu Use this one to start out. (no compiling is allowed on this machine. Note, despite this machine's name, the machine
itself is NOT A SHELL)
- diablo.cs.fsu.edu (faculty and grad students only)
- program.cs.fsu.edu (like linprog, there are four program machines: program1, program2, etc.)
By DEFAULT, when you log into any of the above machines, you'll be placed into the TCSH (pronounced T C Shell, aka, the Tenex shell).
Some other shells that are available to you are:
So the idea is:
- bash (bourne-again shell)
- sh (bourne shell)
- ksh (korn shell)
- csh (C-shell, similar to the TCSH)
Among many others.
Log into a MACHINE of choice --> Use a SHELL to interact with the KERNEL of that machine.
When you use a shell, you'll notice there are some aspects that can change based on what shell you're currently using.
You'll see that the prompt changes as we move from shell to shell.
To change your shell, simply type the name of the new shell you'd like to use. If you'd like to go back to the previous shell, type exit.
Starting in TCSH:
You'll notice in the TCSH, we see that the prompt ends in the >, while in bash and sh, it ends in $. The style of the prompt changes from shell to
shell. Certain shells have better capabilities over others to perform certain tasks. We'll see some of this later in the class. For now, the TCSH is
fine for our needs. We'll utilize bash or sh later when we get to shell scripting.
Major Components of the Unix Operating System
- The Kernel: The master control program. The "kernel" is the brain of the computer. The kernel handles scheduling tasks and managing
resources between processes. Essential to multi-user/multiprocess operation.
- The Shell: This is what the user interacts with. It is the middle man between the user and the kernel. It interprets user commands and
passes them along to the kernel for execution
- File System: Similar to file systems that you're used to on either Mac OS or Windows. The idea of a hierarchical file system, with "root"
as the starting point of all files. Files are stored inside of directories (folders), and directories can be within other directories, etc.
- Commands (Utilities): Software available for usage on the machine. Invoked through commands.
Some Definitions of common Terms Relating to the file system
- File: We can create files (text files) using a text editor available on unix based machines. We'll talk about text editors later. By
default, files are not runnable (executable), only readable and writable.
- Directory: Synonymous to "folder". It is actually a special type of "file" that can store other "files" within it.
- Process: A program that is currently running (executing)
- Executable: Synonymous to a .exe file on your computer. It is a program that can be executed by the OS.
Back to Course Homepage
(c) Melina Vastola, 2015