Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unix : Introduction and Commands

Similar presentations


Presentation on theme: "Unix : Introduction and Commands"— Presentation transcript:

1 Unix : Introduction and Commands
Fundamental of information technology

2 Objectives Introduce Operating Systems concepts
Provide a brief history of the Unix operating system. Provide a brief overview of the Unix system Introduce the Unix command structure Introduce a simple Unix session including: Logging on Changing Passwords (passwd) cal [mon [year]] date man Unixcommand Logging off (exit)

3 Unix A Brief History Developed for AT&T at Bell Labs by Ken Thompson in 1969. Rewritten in C by Dennis Ritchie Developed by programmers for programmers Became widely available in 1975. University of California, Berkeley created the Berkeley Software Distribution (BSD) version. AT&T combined their version with BSD, XENIX, and SunOS to create System V

4 Unix: What’s in a name? Unix may be shown as UNIX ®, Unix, Unix®
UNIX® is a register trademark of The Open Group (as of 2007) the certifying body of the UNIX trademark

5 What Unix does Control program for computers managing:
Processes Multi users Memory Files Provides support utilities called commands for: Executing programs File management File editing Process management

6 Unix Overview H/W Kernel Shell interfaces User Unix

7 Overview of Unix System
Kernel & Shell Unix/Linux is operating system (OS). Unix system is described as kernel & shell. Kernel is a main program of Unix system. it controls hard wares, CPU, memory, hard disk, network card etc. Shell is an interface between user and kernel. Shell interprets your input as commands and pass them to kernel. User input Shell Kernel

8 Unix Overview (cont.) Multi-user & Multi-process
Many people can use one machine at the same time. File & Process Data, directory, process, hard disk etc (almost everything) are expressed as a file. Process is an running program identified by a unique id (PID).

9 Unix Components Kernel Filesystem Shell Utilities

10 Unix Operating System Runs on virtually every manufacturer's hardware
Works the same way on every computer

11 Relation of Files & Directories
Root is like a file cabinet. A directory is like a file drawer A subdirectory is like a folder within a drawer. A path is a list of directories & subdirectories from root to a specific file or subdirectory. / Root Directories Files UNIX File System

12 UNIX Directory Structure
At login, you are in your home directory. This is your current working directory. All files and directories below your home directory usually belong to you. You change your working directory by changing to another directory (cd). UNIX File System

13 Pathnames Absolute Pathname: shows the absolute position of a file
or directory in the hierarchy; /home/user2/bif/docs begins with a slash (/); and describes how to get to the file from the root. UNIX File System

14 Filesystems A file is identified by Combining directory pathnames
To the filename /usr/local/meeting / root usr files local meeting UNIX File System

15 Basic Commands Commands ls show files in current position
cd change directory cp copy file or directory mv move file or directory rm remove file or directory pwd show current position mkdir create directory rmdir remove directory less, more, cat display file contents man display online manual “ls” stands for list. Pwd stands for present working directory

16 Basic Commands Commands su switch user passwd change password
useradd create new user account userdel delete user account mount mount file system umount unmount file system df show disk space usage shutdown reboot or turn off machine “su” means switch user. When you have several user account on one machine.

17 Directory Commands mkdir making a directory
cd changing your working directory pwd printing your working directory ls listing the contents of a directory rmdir removing a directory UNIX File System

18 Directory Commands - mkdir
Make directory under current working directory host% mkdir docs Make directory under subdirectory host% mkdir docs/index Make directory and subdirectory host% mkdir docs docs/index Make directory using absolute path host% mkdir /usr/tmp/abc User1 (cwd) docs User1 (cwd) docs index UNIX File System

19 Common Error Messages:
mkdir: dirname: File exists mkdir: dirname: Permission denied UNIX File System

20 Directory Commands - cd
userx host% cd docs host% cd /usr/tmp/abc/docs host% cd ~abc/docs host% cd host% cd .. docs /usr tmp abc docs ~abc docs UNIX File System

21 Common Error Messages:
pathname: No such file or directory pathname: Permission denied UNIX File System

22 Directory Commands - pwd
Determining the current working directory: host% pwd /scc/users/chitspit/bif where: / root scc/ file system followed by the delimiter (/) users/ subdirectory of scc chitspit/ directory followed by the delimiter (/) bif current working directory UNIX File System

23 Directory Commands - ls
host% ls bin mbox remodel complex.f outdis test host% ls -sF (Multiple options may be specified) 15 bin/ 256 mbox 3 remodel/ 34 complex.f 6 1 test* host% ls ~chitspit/bin au clst prod show xref cwd UNIX File System

24 Process Management commands
Process is a unit of running program. Each process has some information, like process ID, owner, priority, etc. Commands kill Stop a program. The program is specified by process ID. ps Show process status

25 Some Unix Shells Bourne Shell (sh) Bourne Again Shell (bash)
Korn Shell (ksh) C Shell (csh) many others… 25


Download ppt "Unix : Introduction and Commands"

Similar presentations


Ads by Google