OS LAB 2 - Copy1
OS LAB 2 - Copy1
3
What is Unix?
A multi-task and multi-user Operating System
Developed in 1969 at AT&T’s Bell Labs by
Ken Thompson (Unix)
Dennis Ritchie (C)
Douglas Mcllroy (Pipes - Do one thing, do it well)
Slides = 31 5
linux
Popular version of UNIX operating System
6
Components of Linux System
Kernel
Kernel is the core part of Linux.
responsible for all major activities of this operating system.
it interacts directly with the underlying hardware
System Library
System libraries are special functions or programs using which
application programs or system utilities accesses Kernel's features.
do not requires kernel module's code access rights.
System Utility
System Utility programs are responsible to do specialized, individual
level tasks.
7
8
Linux Modes
Kernel Mode
Kernel component code executes in a special privileged mode called kernel
mode with full access to all resources of the computer.
Single process, executes in single address space and do not require any
context switch
Very efficient and fast.
provides protected access to hardware to processes.
User Mode
No accessto system hardware and kernel code.
User programs and other system programs works in User Mode
User programs/ utilities use System libraries to access Kernel functions
9
Portable:
Linux Features
Linux kernel and application programs support their installation on any kind of
hardware platform.
Open Source
Linux source code is freely available
Multi-User
multiple users can access system resources
Multiprogramming
multiple applications can run at same time.
12
Linux File System
• In Linux all directories are attached to the root
directory, which is identified by a forward-slash, "/". -
root.
13
• /bin System binaries, including the • /proc Kernel-processes pseudo file-
command shell system
• /boot Boot-up routines • /root Administrator’s home directory
• /dev Device files • /sbin System administration binaries
• /etc System configuration files • /usr User-oriented software
• /home User directories • /var Various other files: mail,
spooling and logging
• /lib Shared libraries and modules
• /mnt Mounted file-systems
• /lost+found Lost-cluster files, recovered
from a disk-check • /opt Optional software
`
14
Directory Structure
A hierarchal file system structure
At top a ROOT (/) directory with other directories and files hanging under
it
When a user logged in, he/she is placed in his/her HOME (~) directory
/ students
personal … courses
faculty … students
15
CS401 … CS405
Computer storage
A binary system with
information stored as on
or off A kilobyte (KB)
read/writer …
17
Computer storage
Disk drives are referenced by using a letter
followed by a colon:
A: the floppy disk drive
C: the hard disk drive
Depending on the configuration of the computer:
D: or E: a CD drive or Zip drive
F: or greater a network drive
18
Directories/folders
Directories or folders are the key to
creating order on a disk
19
The root directory
A root (or original) directory is automatically created for
each disk
/ R o ot
M y D o c u m e n ts P ro g ra m F ile s W in d o w s N T
L e tte rs R e p o r ts C o n tr a c ts W o rd S P S S P ic t u r e s
2 00 1 2 0 0 2
21
Files
Types of file:
- program
- user-created
- executable
22
File suffixes
.doc = Word
.xls = Excel
.htm(l) = Internet
.pdf = Acrobat
.ppt = PowerPoint
.mdb = Access
23
Booting up Linux O.S.
After pressing POWER button, a code stored in ROM (read only
memory) will run called BIOS
25
Useful Commands
Display directory contents
$ ls
$ ls -a (Display all files in working directory)
$ ls –l (Listing/ Details)
Create Directory
$ mkdir directory_name
$ mkdir ~/courses/cs509
Press ‘tab’ key and see how it helps you during specifying a path
Delete Directory
$ rmdir courses
Change Directory [Working directory]
$ cd ~/courses/cs508
26
Basic Commands
Commands Commands
27
Useful Commands
Display Abs Path of Working Directory
$ pwd
Copy Files
$ cp ~/file1 ~/course/file2
Move File
$ mv ~/file1 ~/course/file2
Removing Files
$ rm file1
$ rm *.o
28
Useful Commands
For more commands visit following web contents:
http://linuxcommand.org/learning_the_shell.php
http://ss64.com/bash/
vic.gedris.org/Manual-ShellIntro/1.2/ShellIntro.pdf
http://www.pixelbeat.org/cmdline.html
29
Summary
In this LAB following topics were covered:
Linux history
Linux directory
Linux directory
Linux file systems
Linux commands
30