Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense...

33
Introduction to Unix Motherhood…

Transcript of Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense...

Page 1: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

Introduction to Unix

Motherhood…

Page 2: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

2

Who I am…

Bill Richards USAF Retired (1994) GS-13 Defense Information Systems

Agency at Tinker AFB (1995) Network Security Manager/Officer (2002) Introduced to Unix in 1989 Introduced to Linux in 1994 Have been a Unix junkie ever since

Page 3: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

3

Contact Information

home email: wildbill at aewa dot orgrose email: wrichards at rose dot eduwork email: brichards at okc dot disa dot milWeb Site: www.wildbill.org/rose

Page 4: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

4

Syllabus Review

Page 5: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

UNIX History and Philosophy

Life with Unix

Page 6: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

6

Definition of an Operating System (OS)

An operating system is a control program for a computer that performs the following operations: manages and allocates computer

resources schedules routine tasks provides a platform to run application

software for users to accomplish tasks provides an interface between the user

& the computer

Page 7: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

7

History of Unix OS

Prior to Unix, many operating systems ran collections or “batches” of operations one at a time.

This single-user “batch-processing” approach did not take advantage of the potential processing power and speed of computers

Note: batch processing lacks the advantage of immediate feedback as opposed to online processing

Enter data infiles to be later

processed

ProcessCollection or

“Batch” of files

Receiveinformation of processed data

Page 8: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

8

History of Unix OS

The Unix OS was developed (based on Multics & CTSS operating systems) by Ken Thompson at the AT&T Bell Laboratories in 1969. He wanted to create an multi-user operating system to run “space wars” game.Ken’s philosophy was to create an operating system with commands or “utilities” that would do one thing well very well (i.e. UNIX).

Page 9: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

9

History of Unix OS

The first versions of UNIX were written in “machine-dependent” program (such as PDP-7).Ken Thompson approach Dennis Ritchie developer of C program), and in 1973 they compiled UNIX in C programming language to make operating system “portable” to other computers systems.

Page 10: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

10

History of Unix OS

Ken Thompson (recently retired from Bell Labs) is on left, and Dennis Ritchie is in the middle. What`s his name is on the right…

Page 11: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

11

History of Unix OS

The Unix OS is a multi-user OS allowing more that more person to directly communicate with the computer.Although the OS can only work on one task at a time, a small piece of time (time slice) is dedicated to each task or user - this is referred to as “time-sharing”.Time sharing gives the illusion that the CPU is giving all the users its full attention

Page 12: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

12

An Illustration of Time-Sharing

TIME

User 1

User 2

User 3

User 4User 5

User 6

User 7

User 8

Page 13: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

13

Development of Unix OS

Unix became a popular OS among institutions such as colleges & universities a 4-year “try before you buy” deal.

Efficient and inexpensive way of networking Promotes Internet use and file-sharing Open system allows for source code to be

shared allows for better coordination among programmers

Page 14: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

14

Development of Unix OS

Students at University of California (in Berkley) further developed the UNIX operating system and introduced the BDS version of Unix

Unix

Bell LabsUNIX System V (5)Proprietary

Berkley Software Distribution (BSD)Free

Page 15: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

15

Development of Unix OS

There were versions of UNIX for the Personal Computer (PC), such as XENIX, etc., but they didn’t catch on in popularity until Linux was developed in the early 90’s.

Page 16: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

16

History of LinuxLinux operating system developed by Finnish programming student named Linus Torvalds

Linus wanted to develop Unix-like OS just to experiment with the new 386 MHz personal computer

Page 17: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

17

Why Has Linux Become soPopular?

Linus decided to make Linux Operating System and it’s source-code for Linux Kernel open to everyone:

Unlike traditional Operating Systems, anyone can modify and distribute Linux OS (as long as they distribute source code of Linux Kernel)

“Competition among Hackers” allow code to be improved and distributed often

Many users can spot bugs in the operating system or application if source code is “open”

Page 18: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

18

Why Has Linux Become soPopular?

Other Factors: PC’s have increased processing power and a

there has been a noted shift from mainframes and minicomputers to PCs.

Since Linux is a “Unix Work-alike”, this OS has a reputation to be a very stable platform for networking (creating at-home servers) and running / maintaining applications.

Agencies such as Free Software Foundation created GNU project to provide free software.

Page 19: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

19

Some Concerns

Many claim that “there are as many version of Linux as there are users…”Fear of allowing Linux users to create “servers” connected up to Internet can lead to attacks from experienced hackers.

Page 20: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

20

Concerns

Linux commands may be considered “user-unfriendly” although GUIs are now used.Prior reputation for difficult install process including the loss of data on other hard disk partitions.The same can be said of MS WindowsBut Linux never Bluescreens!

Page 21: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

21

The Unix philosophy in a Nutshell

The tenets of the Unix philosophy are deceptively simple. They are so simple, in fact, that people tend to regard them as having little importance. That's where the deception comes in. Their simplicity disguises the fact that these ideas are incredibly effective when carried out consistently.The following list will give you an idea of what the Unix philosophy tenets are. The rest of the course will help you to understand why they are important.

Page 22: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

22

Unix Tenets1. Small is beautiful. 2. Make each program do one thing well. 3. Build a prototype as soon as possible. 4. Choose portability over efficiency. 5. Store data in flat text files. 6. Use software leverage to your advantage. 7. Use shell scripts to increase leverage and

portability. 8. Avoid captive user interfaces. 9. Make every program a filter.

Page 23: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

23

Unix Tenets

The preceding list contains tenets about which Unix developers are dogmatic (dogmatic: adj 1: characterized by arrogant assertion of unproved or unprovable principles) You will find similar lists in other books on Unix, as they are the points that everyone considers to be foundational Unix concepts. If you adopt them, you will be considered to be a "Unix person."

Page 24: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

24

Unix Lesser Tenets

The following lists 10 lesser tenets, are ideas that tend to be part of the Unix world's belief system. Not everyone involved with Unix is as dogmatic about these, and some of them aren't strictly characteristic of Unix. Still, they seem to be a part of the Unix culture (and the Linux culture by inclusion).

Page 25: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

25

Unix Lesser Tenets1. Allow the user to tailor the environment. 2. Make operating system kernels small and lightweight. 3. Use lowercase and keep it short. 4. Save trees. 5. Silence is golden. 6. Think parallel. 7. The sum of the parts is greater than the whole. 8. Look for the 90-percent solution. 9. Worse is better. 10. Think hierarchically.

Page 26: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

26

Unix Tenets

After reading the list of tenets, you may be wondering just what all the fuss is about. "Small is beautiful" is not such a big deal. "Doing one thing well" sounds pretty narrow-minded in and of itself. Choosing portability over efficiency isn't the sort of idea that will change the world.

Is that all there is to Unix? Is Linux just a small operating system for small minds?

Page 27: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

27

Unix TenetsPerhaps we should mention that Volkswagen built a marketing campaign around the "small is beautiful" concept that helped it sell millions of automobiles. Or consider that Sun Microsystems, a leading Unix systems vendor, based its strategy on putting "all the wood behind one arrowhead" or, in other words, "doing one thing well." Could all the interest in PDAs, wireless Web access, and hand-held video have something to do with portability?

Page 28: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

28

Unit Tenets

Come. Let us begin the journey.Given words such as "dogmatic," "tenets," and "belief system," might one wonder whether the Unix philosophy describes a cultural phenomenon or a technological one phenomenon.

The truth is they describe both!!

Page 29: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

29

Chapter SummaryThe operating system controls all computer resources and provides the base upon which application programs can be used or written

A server-based network is centralized where security and maintenance are handled by the system administrator and all systems rely on the server; a peer-to-peer network is decentralized where security and maintenance is distributed to each system and if one of the systems fails, the network continues to function

Page 30: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

30

Chapter SummaryUNIX is a multi-user, multitasking operating system

UNIX systems may be configured as servers or as client workstations in a server-based network, as client/server workstations in a peer-to-peer network, or stand-alone workstations when no network connection

Page 31: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

31

Chapter SummaryThe concept of the layered components that make up an OS originated with UNIX

Linux is a UNIX-like OS and can coexist with Windows and MS-DOS

In UNIX, you communicate with the OS programs through an interpreter called the shell and UNIX provides shells such as the Bourne, Korn, and C shells, with Bash being the most popular on Linux systems

Page 32: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

32

Chapter SummaryIn UNIX, the system administrator sets up accounts for users that supply a username and password

You work with UNIX by typing commands that you can learn by referring to the online manual called man pages; commands have specific syntax and allow you to see brief descriptions of commands, see who is logged in, display the system calendar, and log out

Page 33: Introduction to Unix Motherhood…. 2 Who I am… Bill Richards USAF Retired (1994) GS-13 Defense Information Systems Agency at Tinker AFB (1995) Network.

33

Chapter Summary

Most shells provide basic command-line editing capabilities and keep a history of your most recently used commands

You can view the contents of files with view commands such as cat, less, more, head, and tails