Loading Loading Medway Makers: Knowledge

Introduction

Although Linux has a number of distributions with Graphical User Interfaces, like Ubuntu, the objective of this page and the sub-pages is to look at Linux from an engineering perspective and to learn to use the Command Line Interface provided by the "shell".

One of the prime objectives of an operating system is provides a standard interface for the user's processes to use the non-standard functionality served by the varied hardware of different machines.

I am not going to re-write what has already been written. I will simply provide links to that.

First let's be clear that computers perform processes and that the processes they perform are determined by programs. Running a program is performing a process determined by that program.

Central to the whole Linux operating system is what is called the Kernel and it is a process defined by a program that is started when the system boots.

Because Unix was a multi-user operating system, so is Linux and so the Kernal uses the hardware to share the computers time between multiple processes that appear to all run at once.

The kernal can start many other processes (defined by programs of course) and have them all running simaltainiously.

One vital program that can be run is called the shell. It is a process that provides an on screen terminal that commands can be typed into from the keyboard and results displayed.

The File System

On Unix and Linux a "file" is anything you can write data to or read data from. It includes not only stored data but also data communication channels between physical systems or processes.

Therefore hardware devices device like a disk drives, memory sticks or printers, are just treated as files in the file system.

There are also special files called "directories" which contain references to other files. Directories can also contain the references to other directories as well as files. Although it isn't physically the case we often think of directories as folders that contain other folders and files. The filesystem normally does not allow files or directories to be referenced in more than one other directory. (Links are an exception to this.)

The result is a tree like structure where there is a root directory that contains directories and files, where the directories contains directories and files and so on and so on.

Files and directories in the file structure can be refered to by their paths. So for example;

   /home/tom/pictures/itsme.jpg

is the path to the file itsme.jpg. Every user on a linux system has their own "home directory". I am a user called "tom" and in my home directory I have a pictures directory containing a picture called itsme.jpg.

When you mount a device like a disk drive, memory stick or printer, in Linux, it is the process of allocating it a position in the file structure so that it can be referenced and so made use of.

The first partition on a hardrive could have the path /dev/hda1 the second partition path would be /dev/hda2.

The most obvious way for you to gain access to the file structure is through the "shell". The shell is the process that provides the user with the Command Line Interface on a Terminal.

To find out more about the the file system look at The File System but remember the Shell because the shell is your interface to the file system.

The Shell

The Shell is a user process that provides a terminal, and processes the commands typed by the user. It can be accessed in Ubuntu via the menu Applications>Accessories>Terminal. Other Linux GUIs also provide the program Terminal.

In the old days the terminal might have been a real physical terminal but now it is just a simulation in a window.

The shell is a user program that provides a command prompt on the terminal, processes the typed commands and displays the results.

There are various shells that can be used in Linux. Here I talk about the bash shell.

Once in a terminal the shell provides a prompt which is a $ for a normal user or a # for a root user. Also the prompt usually looks something like this;

   tom@gold:~$

" Tom" is the user and "gold" is the computer name.

To find out more about the the shell look at The Shell

The Kernel

The kernel of an operating system is a process that provides a standard interface for other processes to use the non-standard functionality served by the varied hardware of different machines.

What a process does is defined by the program being run.

Thus programs written to use the Linux kernel can run on any hardware the Linux kernel can run on.

The Linux kernel serves (provides) the following functionality;

To find out more about the kernel look at The Kernel