Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to UNIX.

Similar presentations


Presentation on theme: "Introduction to UNIX."— Presentation transcript:

1 Introduction to UNIX

2 Preface UNIX was introduced to the world by Bell Labs in the late 1970’s. It was intended to be a powerful operating system that could be ported to variety of hardware environments. Over years, UNIX has gone through many editions, versions, and changes; but never lost its main feature – power.

3 UNIX was designed as an operating system for programmers and scientists who work closely with the hardware; it was never intended to be “friendly”. UNIX survived as a nice product, highly useful in the scientific and engineering community, large corporations, academia, and most importantly, as the operating system of choice for the Internet.

4 Chapter 1 Introduction

5 Several features of UNIX that made it very popular:
Portable UNIX found on more hardware platforms than any other OS. It was developed using the C language. Because C programs are easily moved from one hardware to another, it is relatively simple to port it to different environment. All that is needed is a standard C compiler.

6 Multiuser In environment where hundreds of users connect to the Internet daily, OS must be able to support multiple users. The UNIX design allows multiple users to concurrently share hardware and software. The UNIX resource-sharing algorithms allow them to share the resources while at the same time preventing any one user from locking out others. It is very democratic OS, everyone gets an equal chance at the resources.

7 Multitasking Multitasking is an OS feature that allows a user to run more than one job at a time. Networking UNIX was not originally a networking OS. Networking was added after the split between BSD UNIX and AT&T UNIX. Both developers incorporated networking into the heart of OS. Networking allows users from one location to log into system at other sites and execute any UNIX command.

8 UNIX treats I/O devices like ordinary files.
Organized File System UNIX has a very organized file and directory system that allow users to organize and maintain files. Device Independence UNIX treats I/O devices like ordinary files. The input to a program can come from any device or file and output of the program can go to any device or file. The source and destination for file I/O is easily controlled through a UNIX design feature redirection. IX

9 Utilities Productivity is directly proportionate to the software available on a system. There are more than 100 utilities that a user can use in a UNIX system. Services In a large user environment, specially designated administrators monitor the system and help users. They need support utilities to work with system resources such as disk and security access. UNIX includes the support utilities for the system administration and control.

10 Computer System A computer system is a combination of hardware and software that lets us work with a computer. The hardware is the physical element. The software is a set of programs (instructions) that allow hardware to do its job.

11 Components of Computer Hardware
The hardware is the combination of devices that can be seen or touched.

12 Software The software is the combination of programs.
Consists of a set of programs that serve the computer itself: OS and a set of support programs, such as disk copy. Consists of programs that are written to solve user’s problems. They range from word processors to specialized applications.

13 The Operating System The OS is a special category of system software that manages all the operating facets of the computer. UNIX is an OS. It is different from other common OS’s such as DOS, Windows, and the Mac OS. OS makes the computer what it is. Sometimes the term OS refers to all system software. Sometimes it refers only to the central kernel. We include in OS its primary tasks: resource allocation and scheduling, data management including file I/O, and system security.

14 UNIX Environment UNIX is used in three different computing environments: Stand-alone personal environment. Time-sharing environment. Client/server systems.

15 Personal Environment Many users are installing UNIX on their personal computers. This trend to personal systems accelerated in the mid-1990’s with the availability of Linux, a free UNIX system.

16 Time-sharing Environment
In a time-sharing environment, many users are connected to one or more computers. The terminals are often non-programmable. The output devices and auxiliary storage devices are shared by all of the users

17 The Time-Sharing Environment

18 Client/Server Systems
A client/server environment splits the computing function between a central computer and users’ computers. The users are given personal computers or workstations so that some of the computing responsibility can be moved off the central computer and assigned to workstations. The users’ workstations are called the client. The central computer is knows as a server. The work is shared between a central computer and users’ computers, therefore response time and monitor displays are faster.

19 The Client/Server Environment

20 Unix Structure UNIX consists of four major components: the kernel, the shell, a standard set of utilities, and application programs.

21 The Kernel The kernel is the heart of the UNIX system.
It contains the two most basic parts of OS: process control and resource management. All other components of the system call on the kernel to perform these services for them.

22 The Shell The shell is the part of UNIX that is most visible to the user. It receives and interprets the commands entered by the user. It is the part that we as users get to know the most. If the command requires a utility, the shell requests that the kernel executes that utility. If the command requires an application program, the shell requests that it be run.

23 The Shell (cont) There are two major parts of a shell.
The first is the interpreter that reads the commands and works with the kernel to execute them. The second is a programming capability that allows programmers to write a shell script. A shell script is a file that contains shell commands that perform a useful function. It is also known as a shell program.

24 The Shell (cont) There are three standard shells used in UNIX today.
The Bourne shell, developed by Steve Bourne at the AT&T, is the oldest. An enhanced version of the Bourne shell, called Bash (Bourne again shell), is used in Linux. The C shell, developed in Berkeley by Bill Joy, receives its name from the fact that its commands were supposed to look like C statements. A version of C shell, tcsh, is used in Linux. The Korn shell, developed by David Korn at the AT&T, is the newest.

25 Some Standard UNIX Shells

26 Utilities Applications
A utility is a standard UNIX program that provides a support process for users. Three common utilities are text editors, search programs, and sort programs. Applications Applications are programs that are not a standard part of UNIX. Written by system administrators, or users, they provide an extended capability to the system. Many standard utilities started out as applications.

27 Accessing UNIX To begin, you need to log in to the system.
Then you enter commands and the system responds. When you finished you work, you log out. The time spend working with the system is known as a session.

28 User ID You and your account are identified by a special code known as a user id. Password A password is a secret code that you supply to the server and that is known only to you. UNIX encrypts passwords when it stores them in the server so that no one can figure out what they are.

29 Interactive Session The interactive session contains three steps: login, interaction, and logout.

30 Interactive Session (cont)
The default system prompt for bourne, bash, and korn shells is a dollar sign ($). For the C and tcsh shells, the prompt is a percentage sign (%).

31 Commands The basic of all UNIX interaction is the command.
They are generally a single line entered at the command line prompt that cause a program to be executed. They can be included in executable files to form scripts. All UNIX commands apply an action to some input data and create some output data. The input usually comes from keyboard; the output is usually shown on the monitor (screen).

32 Command Source and Destination

33 Command Syntax

34 The date Command The date command displays the system date and the time.

35 The calendar Command The calendar command , cal, displays the calendar for a specified month or a year. It has no options.

36 The who Command The who command displays all the users currently logged into the system.

37 The passwd Command The password command, passwd, is used to change your password. It has no options or attributes.

38 The echo Command The echo command copies its argument back to the terminal.

39 The man Command The man command displays online documentation.
-k option will display information about a topic.

40 The lpr Command The common print utility is line printer (lpr).

41 The tty Command The tty command is used to show the name of the terminal you are using.

42 The clear Command The clear command clears the screen and puts the cursor at the top.

43 The stty Command The set terminal (stty) command sets or unsets selected terminal I/O options. When the terminal is not responding properly, the set terminal command can be used to reconfigure it.

44 Set Terminal with Arguments
Set Erase and Kill (ek) The ek argument sets the default erase (Delete key ctrl+h) and kill (ctrl+c) to their defaults. Set terminal to General Configuration (sane) The sane argument sets the default terminal configuration to a reasonable setting that can be used with majority of terminals stty sane Set Erase key (erase) By default, the Erase key is ctrl+h. We can reconfigure the keyboard to use another key as the Delete key. stty erase ^e

45 Set Terminal with Arguments (cont)
Set Kill (kill) The Kill key deletes a whole line. By default it is ctrl+u. We can change it using the set terminal command with the kill argument stty kill 9 It is not recommended to use a single key. Set Interrupt Key (intr) The interrupt key interrupts or suspends a command. By default it is ctrl+c. It can be reset using intr argument stty intr ^9 There are many more stty command options and arguments. Many of them are applicable only to superusers. uma

46 The script Command The script command can be used to record an interactive session. To stop recording, key exit. typescript is a default file name. We can pass a file name as an argument script myfilename

47 The uname Command UNIX system stores data about itself. To see these data, we can use the uname command.

48 The bc Command bc command turns UNIX into a calculator.
To terminate it, we key ctrl+d. scale expression sets the number of digits after the decimal point. The base of the calculation can be changed by setting the input base (ibase) and the output base (obase).


Download ppt "Introduction to UNIX."

Similar presentations


Ads by Google