Download presentation
Presentation is loading. Please wait.
1
UNIX I Unix Fundamentals 8/31/98 1 1
2
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
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
4
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
5
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
6
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
7
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
8
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
9
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
10
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
11
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
12
Unix Operating System - Overview
8/31/98 3 3
13
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
14
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
15
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
16
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
17
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
18
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
19
Unix Operating System Changing Password 8/31/98 3 3
20
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
21
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
22
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
23
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
24
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
25
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
26
Unix Operating System Some Basic Commands: finger 8/31/98 3 3
27
Unix Operating System Some Basic Commands: finger
example of the “short” form of finger. 8/31/98 3 3
28
Unix Operating System Some Basic Commands: date
date command displays the current date & time on the screen. 8/31/98 3 3
29
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
30
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
31
Unix Operating System Some Basic Commands: write
example of a write session... 8/31/98 3 3
32
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
33
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
34
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
35
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
36
Unix Operating System Some Basic Commands: man example of man who ...
8/31/98 3 3
37
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
38
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
39
Unix Operating System Some Basic Commands: cp 8/31/98 3 3
40
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
41
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 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
42
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
43
Unix Operating System 8/31/98 3 3
44
Unix Operating System 8/31/98 3 3
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.