UNIX I Unix Fundamentals 8/31/98 1 1.

Slides:



Advertisements
Similar presentations
Objectives Overview Define an operating system
Advertisements

Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Chapter One The Essence of UNIX.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
CS 497C – Introduction to UNIX Lecture 1: Getting Started Chin-Chih Chang
UNIX chapter 03 Getting Started Mr. Mohammad Smirat.
What is Unix Prepared by Dr. Bahjat Qazzaz. What is Unix UNIX is a computer operating system. An operating system is the program that – controls all the.
CST334 Unix & X Window System
Introduction A computer system consists of hardware system programs application programs.
Chapter 10 – UNIX. History In late 1960s, two employees of Bell Labs (Ken Thompson & Dennis Ritchie) designed a new operating system to overcome the constraints.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
Introduction to Shell Script Programming
Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards.
Introduction to Unix/Linux Chapter One The Essence of UNIX.
UNIX Unbounded 5th Edition Amir Afzal Chapter 3 Getting Started
Module 1 Introduction to UNIX/Linux
Chapter 9: Networking with Unix and Linux Network+ Guide to Networks Third Edition.
Explain the purpose of an operating system
Agenda Chapter 1: Linux (Unix) Features Commands (Chapters 2 & 3) Command Structure / Command line editing man, passwd, cal, date, whereis, which Working.
CS 390 Unix Programming Summer Unix Programming - CS 3902 Course Details Online Information Please check.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Introduction to Unix (CA263) Getting Started By Tariq Ibn Aziz.
Operating System Part II: Introduction to the Unix Operating System (The Evolution of Unix)
Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command.
History of UNIX a short version CSCI 333 August 31, 2011.
Computers & Operating Systems
FTP Short for File Transfer Protocol, the protocol for exchanging files over the Internet.protocolfilesInternet works in the same way as HTTP for transferring.
Introduction to Programming Using C An Introduction to Operating Systems.
Introduction to UNIX. 2 History of Unix  1960 Software based on Hardware Limits  1969 Ken Thompson Develop a Better Programming Environment  1971 New.
Basic UNIX Concepts. Why We Need an Operating System (OS) OS interacts with hardware and manages programs. A safe environment for programs to run is required.
Chapter 9: Networking with Unix and Linux. Objectives: Describe the origins and history of the UNIX operating system Identify similarities and differences.
Introduction to UNIX CS 2204 Class meeting 1 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections.
SCSC 455 Computer Security Chapter 3 User Security.
Chapter 9 Operating Systems Discovering Computers Technology in a World of Computers, Mobile Devices, and the Internet.
Introduction to UNIX CS465. What is UNIX? (1) UNIX is an Operating System (OS). An operating system is a control program that allocates the computer's.
BIF713 Introduction to Linux. Agenda Getting Started: Using Linux Unix and Linux - Structure / Features Elements of the Linux Philosophy Linux Command.
Agenda The Bourne Shell – Part I Redirection ( >, >>,
WHY AN OPERATING SYSTEM (OS) OS interacts with hardware and manages programs. Programs not expected to know which hardware they will run on. Must be possible.
CHAPTER 7 Operating System Copyright © Cengage Learning. All rights reserved.
System SOFTWARE.
Lecture-7 Introduction to DOS. Introduction to UNIX/LINUX OS.
DISCOVERING COMPUTERS 2018 Digital Technology, Data, and Devices
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
Overview of Linux Fall 2016 Dr. Donghyun Kim
A LECTURE NOTE.
Introduction to UNIX.
Unix Scripting Session 1 March 6, 2008.
Chapter Objectives In this chapter, you will learn:
SUSE Linux Enterprise Desktop Administration
SQL and SQL*Plus Interaction
Operating System.
An Introduction to Computers and Visual Basic
Unix Shells.
Module 4 Remote Login.
Chapter 2: System Structures
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands:
Guide To UNIX Using Linux Third Edition
Introduction to Operating System (OS)
Chapter 3 Software Interfaces.
Chapter 1 The Essence of UNIX and Linux
An Introduction to Computers and Visual Basic
Unit# 3: Operating System
Unix : Introduction and Commands
Chapter 2: The Linux System Part 1
An Introduction to Computers and Visual Basic
Linux Professor Sabol.
An Introduction to Operating Systems
Presentation transcript:

UNIX I Unix Fundamentals 8/31/98 1 1

Unix Operating System An Operating System (OS) is a control program for a computer. It allocates computer resources & schedules tasks; Computer resources include all hardware - CPU, system memory, disk storage, printers, terminals, etc. - and anything that is connected to or inside the computer; An OS also provides an interface to the user(s); 8/31/98 3 3

Unix Operating System An OS performs many tasks: keeps track of the file-system and the files; monitors keyboard; controls and allocates memory to tasks; processes user requests; schedules tasks for the CPU to process 8/31/98 3 3

Unix Operating System - History Unix OS was developed at AT&T Bell Labs in Murray Hill, NJ; Developed in 1969 by Ken Thompson, on a DEC PDP-7 computer, using PDP’s assembly language; Dennis Richie & others contributed to the effort, and by 1971, Unix was a fully functional OS; In the early 1970s, it ran only on PDP-7, PDP-11/40, PDP-11/45, and PDP-11/70 where it got the attention of universities. 8/31/98 3 3

Unix Operating System - History Bell Labs offered Unix licenses for a minimal fee to all universities. By mid-1970s, about 80% of them, were running Unix; Soon, Unix made its way to commercial environments; University of California at Berkeley made significant additions & changes to the Bell Labs Unix version. It was known as Berkeley Software Distribution (BSD); The other major version is AT&T’s Unix System V. 8/31/98 3 3

Unix Operating System - History Why is Unix so popular? Advances in hardware technology had created the need for a multi-tasking OS, to take advantage of its features; With the cost of hardware continually dropping, hardware manufacturers can no longer afford to develop & support proprietary OS. Hardware manufacturers needed a generic OS. 8/31/98 3 3

Unix Operating System - History Originally, Unix was written in PDP-7 assembly language. But in 1970, Ken Thompson developed a machine-independent, higher-level language called B, to re-write Unix, and make it more portable across platforms; Dennis Ritchie modified B, and created C, and with Thompson rewrote Unix; C was (and is) also distributed as a compiler; This move made Unix very portable... 8/31/98 3 3

Unix Operating System - Genealogy AT&T Unix System V 1983, System V is born, as a standard version for OEM. It contains features from 4.1 bsd; 1985, Release 2.0 is announced. Runs 5%-10% faster, better file handling, introduces mailx; >1985, Release 3.0 (improves networking capabilities), 3.1 (adaptable to international users by supporting 8-bit characters), 3.2. (adds security enhancements and supports FACE); 1991, Release 4.0 incorporates popular features from BSD, SunOS, and Xenix, adding more than one-hundred commands. 8/31/98 3 3

Unix Operating System - Genealogy Berkeley Unix For the past fifteen-years UCB has continued development of BSD; latest version is Unix 4.3 BSD. 8/31/98 3 3

Unix Operating System - Genealogy OSF versus Unix International In 1988, AT&T purchases part of Sun Micro-systems, and along with Unisys, Data General, and others, founded Unix International (UI). This open consortium agreed to oversee the development of System V standards; IBM, Hewlett-Packard, Digital, and others, formed a competing consortium called Open Software Foundation (OSF). They raised about $ 90MM, to start developing a new Unix OSF standard; 8/31/98 3 3

Unix Operating System - Genealogy Unix Interfaces Historically, the standard Unix interface, called a command-line interface, has been considered cryptic and difficult to use; AT&T introduced in release 3.2 a menu-driven interface called FACE. In release 4.0, AT&T defines a GUI standard, called OPEN LOOK, developed with Sun Microsystems (remember UI?); OSF has created a popular GUI standard called OSF/MOTIF. SCO has implemented Motif under the name of Open Desktop. 8/31/98 3 3

Unix Operating System - Overview 8/31/98 3 3

Unix Operating System - Overview Utilities: Unix OS includes hundreds of utilities or commands. Example: sort, man; Multi-user Support; Multi-tasking: it allows each user to run more than one job or process; Shells: command interpreter that interfaces between user & OS. Popular ones: Bourne, C Shell, and Korn; File Structure: Unix provides a mechanism to arrange files in a tree-like metaphor. It also provides links; 8/31/98 3 3

Unix Operating System - Overview Security: private and shared files; Filename Generation; Device-independent Input & Output: diversion mechanism called re-direction; Inter-process Communication: using pipes & filters, Unix allows to send output of a program into another program as input; Job Control; Electronic Mail; Screen-oriented Editor; 8/31/98 3 3

Unix Operating System - Overview Delayed Execution of Jobs; Networking Utilities: access to remote systems, remote logins, or NFS; System Administration: support for user accounts administration, installing software, backup & restore; GUI: X-windows system. 8/31/98 3 3

Unix Operating System - Getting Started Logging In The first step in using Unix OS is to login; Since we are using Windows telnet sessions (more on telnet later), we will be working using a windows interface; To invoke the login prompt, press the [Enter]-key; Unix will respond with something like: Welcome to Unix Version 7.3. Login: _ Password: xxxxxx Once you login, any communication is done through the command interpreter, knows as the shell. 8/31/98 3 3

Unix Operating System Typically, the access to Unix OS would be done through a PC running TCP/IP, and using a program like telnet. 8/31/98 3 3

Unix Operating System Changing Password When you first login on a Unix OS, either there will be no password, or there will be one assigned to the account; In either case, is a good idea to change the password. The Unix command to change the password is: prompt] passwd Changing password for account Old password: zzzzzzz New password:zzzzzzz Re-enter new password: zzzzzzz 8/31/98 3 3

Unix Operating System Changing Password 8/31/98 3 3

Unix Operating System Logging Out The process of signing off is called logging out. To log out, the Unix prompt must be showing. To kill any command or process being executed, and logout, type the key sequence, [Ctrl]-[d] If [Ctrl]-[d] does not work, type exit of logout, and then press [Enter]-key. Logout command is typically used in the C Shell, whereas [Ctrl]-[d] or exit are for the Bourne and Kern Shells. 8/31/98 3 3

Unix Operating System Correcting Mistakes The most commonly used key to erase a character is the [Backspace]-key. However, some of the Windows emulators, create a ^D string. If this is the case, use the [Delete]-key, on the auxiliary keypad. Note that after pressing the [Enter]-key at the end of a command, is too late to correct a mistake. To delete a complete word, use [Ctrl]-[w] sequence; To delete an entire line, use [Ctrl]-[u] sequence. To interrupt a procedure or process use [Ctrl]-[c]. 8/31/98 3 3

Unix Operating System The Bourne Shell and the C Shell The shell is a part of the Unix OS that acts as a command interpreter. It relays keyboard commands to the computer, and return its responses to the screen; The Bourne Shell is the standard shell for Bell Labs’ Unix System V. Berkeley’s BSD uses the C Shell as the standard; Typically the Bourne Shell uses the $ prompt, and the C Shell uses the % prompt. Note that prompts may be modified; Unix System V supports all four shells (Korn & job-control are the other two). 8/31/98 3 3

Unix Operating System Some Basic Commands If the shell identifies the command as something that knows, then executes it. If it does not recognizes it, then it issues a message to the screen. 8/31/98 3 3

Unix Operating System Some Basic Commands: who who utility displays a list of the users currently logged in. other two variations: whoami and who am i 8/31/98 3 3

Unix Operating System Some Basic Commands: finger finger command may be used with or without an argument; Without an argument, it works like who but it gives the full name, and idle time (in minutes) since the user issued the last Unix command; With an argument (userid) it displays more information regarding such account or userid; The option -s in the finger command gives a short version of the userid. 8/31/98 3 3

Unix Operating System Some Basic Commands: finger 8/31/98 3 3

Unix Operating System Some Basic Commands: finger example of the “short” form of finger. 8/31/98 3 3

Unix Operating System Some Basic Commands: date date command displays the current date & time on the screen. 8/31/98 3 3

Unix Operating System Some Basic Commands: cal cal command displays the calendar for the year typed-in. If omitted, it displays the current month. Syntax: cal [[month] year] 8/31/98 3 3

Unix Operating System Some Basic Commands: write write utility may be use to send a message to another user who is logged in. If the other user opts to use write to send you a message, you can establish a two-way communication; when write is used, it displays a banner on the other user’s terminal saying that you are about to send a message; Syntax: write destination-user As soon as [Enter]-key is pressed, destination-user gets the message. Use [Ctrl]-[d] to sign-off the write utility. 8/31/98 3 3

Unix Operating System Some Basic Commands: write example of a write session... 8/31/98 3 3

Unix Operating System Some Basic Commands: mesg If you do not want to receive messages, you can give the following command: prompt] mesg n After giving this command, another user cannot send you messages using write. If they do so, there is a Permission denied message, when they try to write you. To turn it on, type mesg y. 8/31/98 3 3

Unix Operating System Some Basic Commands: wall wall - write to all users /usr/sbin/wall [ -a ] [ -g grpname ] [ filename ] wall reads its standard input until an end-of-file, and sends this message to all currently logged-in users preceded by: Broadcast Message from ... If filename is given, then the message is read in from that file. Pseudo-terminals that do not correspond to rlogin sessions are ignored. Thus, when using a x-window system, the message appears only on the console window. However, - a will send the message to all pseudo-terminals. 8/31/98 3 3

Unix Operating System Some Basic Commands: wall It is used to warn all users, typically prior to shutting down the system. The sender must be super-user to override any protections the users may have invoked, for instance, mesg n. Options: -a broadcast message to the console -a broadcast message to the console and pseudo-terminals. -g grpname broadcast to a specified group only. 8/31/98 3 3

Unix Operating System Some Basic Commands: man man (manual) utility displays pages from the system documentation on the display; this documentation is useful if one knows what utility to use, but have forgotten how to use it; Syntax: man utility_name 8/31/98 3 3

Unix Operating System Some Basic Commands: man example of man who ... 8/31/98 3 3

Unix Operating System Some Basic Commands: echo echo utility copies to the terminal anything you put on the command line after echo; 8/31/98 3 3

Unix Operating System Some Basic Commands: cp cp (copy) utility makes a copy of a file. It can copy any file, including text and executable program files; cp is useful to make back-up copies of single files, so one can experiment with them; cp line specifies source and destination files. source is the file cp is going to copy from, and destination is the file to copy to; if the destination file exists, cp utility will overwrite it, without warning the user; Syntax: cp source_file destination_file 8/31/98 3 3

Unix Operating System Some Basic Commands: cp 8/31/98 3 3

Unix Operating System Some Basic Commands: grep grep - search a file for a string pattern Syntax: grep [-E|-F] [-c| -l|-q] [-bhinsvwx] pattern [file...] grep command searches files for a pattern & print all lines that contain that pattern. Be careful using the characters $, *, [, ^, |, (, ), \ in the pattern_list because they are also meaningful to the shell. It is safest to enclose the entire pattern in single quotes '...'. If no files are specified, grep assumes standard input. 8/31/98 3 3

Unix Operating System Some Basic Commands: grep [reality:~] grep IPv6 cot* cot6930.gadiaz.hw1.ch17-20.txt.2: The error reporting mechanism for IPv4 and IPv6 are similar. cot6930.gadiaz.hw1.ch17-20.txt.2: Q.18.1 - How many octets does the smallest possible IPv6 datagram contains? cot6930.gadiaz.hw1.ch17-20.txt.2: Smallest possible IPv6 datagram is 41 bytes long (assuming a minimum of one cot6930.gadiaz.hw1.ch17-20.txt.2: 1. IPv6 header: 40 bytes (octets); cot6930.gadiaz.hw1.ch17-20.txt.2: Largest possible IPv6 datagram is theoretically infinite, since there are cot6930.gadiaz.hw1.ch17-20.txt.2: no limits in the IPv6 protocol for the length or number of Entension Headers. [reality:~] 8/31/98 3 3

Unix Operating System Files & Unix File Structure Files are the heart of Unix OS; Unix stores programs, data, text, messages, in form of files; Unix directory contains files or other directories under it; This arrangement creates a file structure that resembles a tree (upside-down); The cuspid of the tree is the root directory. 8/31/98 3 3

Unix Operating System 8/31/98 3 3

Unix Operating System 8/31/98 3 3