eg-253:unixintro
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
eg-253:unixintro [2007/09/11 17:43] – eechris | eg-253:unixintro [2011/01/14 12:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== UNIX Introduction ====== | ||
+ | |||
+ | ===== What is UNIX? ===== | ||
+ | |||
+ | {{ eg-253: | ||
+ | UNIX systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment. However, knowledge of UNIX is required for operations which aren't covered by a graphical program, or for when there is no windows interface available, for example, in a telnet session. | ||
+ | |||
+ | ===== Types of UNIX ===== | ||
+ | |||
+ | {{ eg-253: | ||
+ | |||
+ | Here in the School of Enginnering, | ||
+ | |||
+ | ===== The UNIX operating system ===== | ||
+ | |||
+ | The UNIX operating system is made up of three parts; the **kernel**, the **shell** and the **programs**. | ||
+ | |||
+ | ==== The kernel ==== | ||
+ | |||
+ | The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the file store and communications in response to system calls. | ||
+ | |||
+ | As an illustration of the way that the shell and the kernel work together, suppose a user types '' | ||
+ | |||
+ | ==== The shell ==== | ||
+ | |||
+ | The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out. The commands are themselves programs: when they terminate, the shell gives the user another prompt ('' | ||
+ | |||
+ | The adept user can customize his/her own shell, and users can use different shells on the same machine. Ubuntu, and the other Linux systems used at Swansea, use the bash shell by default. | ||
+ | |||
+ | The bash shell has certain features to help the user inputting commands. | ||
+ | |||
+ | * //Filename Completion// | ||
+ | |||
+ | * //History// -- The shell keeps a list of the commands you have typed in. If you need to repeat a command, use the cursor keys to scroll up and down the list or type history for a list of previous commands. | ||
+ | |||
+ | ==== Files and processes ==== | ||
+ | |||
+ | Everything in UNIX is either a file or a process. | ||
+ | |||
+ | A process is an executing program identified by a unique PID (process identifier). | ||
+ | |||
+ | A file is a collection of data. They are created by users using text editors, running compilers etc. | ||
+ | |||
+ | Examples of files: | ||
+ | |||
+ | * a document (report, essay etc.) | ||
+ | * the text of a program written in some high-level programming language | ||
+ | * instructions comprehensible directly to the machine and incomprehensible to a casual user, for example, a collection of binary digits (an executable or binary file); | ||
+ | * a directory, containing information about its contents, which may be a mixture of other directories (subdirectories) and ordinary files. | ||
+ | |||
+ | ===== The Directory Structure ===== | ||
+ | |||
+ | All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally called **root** (written as a slash ''/'' | ||
+ | |||
+ | {{ eg-253: | ||
+ | |||
+ | In the diagram above, we see that the home directory of the undergraduate student " | ||
+ | |||
+ | The full path to the file report.doc is " | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Starting a UNIX terminal ===== | ||
+ | |||
+ | This is how the Ubuntu 6.06 desktop looks (the version you are using will differ cosmetically but not functionally). To start a terminal session, navigate to the // | ||
+ | |||
+ | |||
+ | {{ eg-253: | ||
+ | |||
+ | |||
+ | An UNIX Terminal window will then appear with a '' | ||
+ | |||
+ | {{ eg-253: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[eg-253: | ||
+ | |||
+ | --- // |