1 / 38

Introduction To Unix- CS 21

Introduction To Unix- CS 21. Lecture 1. Overview Of Today’s Lecture. Class introduction Brief history of Unix Hacker mentality Unix design mentality. Syllabus. Instructor: Jason Villarreal T.A. : Ioannis Drougas Lecture Times: TR 9:40-11:00 Lab Times: Thursday 2-5, 6-9

hang
Download Presentation

Introduction To Unix- CS 21

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction To Unix- CS 21 Lecture 1

  2. Overview Of Today’s Lecture • Class introduction • Brief history of Unix • Hacker mentality • Unix design mentality

  3. Syllabus • Instructor: Jason Villarreal • T.A. : Ioannis Drougas • Lecture Times: TR 9:40-11:00 • Lab Times: Thursday 2-5, 6-9 • Lab attendance is mandatory, there will be lab assignments each lab

  4. Books • Required: “Teach Yourself Unix in 24 Hours” by Dave Taylor. • Recommended: • Unix Power Tools, 3rd Edition* • Perl in a Nutshell* • The LaTeX Companion *Available online for free to UCR students at library.ucr.edu/oreilly

  5. Grading • 3 Quizzes – 15% total (5% each) • 1 Midterm – 20% • 1 Final – 30% • Lab Assignments – 25% total • Homework – 10%

  6. Special Note On Cheating • Cheating will not be tolerated • What constitutes cheating? • Sharing of answers to questions on homework, assignments, or tests • Sharing of code • Using anyone else’s work as your own • Discussion of high level concepts and studying text is all right. • Moral: If you’re not sure, don’t do it!

  7. What Are You Going To Get Out Of This Class? • First answer: Whatever you put into this class • Specifically: • Working knowledge to accomplish most tasks in Unix • From simply managing files to programming projects and scripting • Everything to get you familiar with what is necessary in the rest of the computer science curriculum • An appreciation for the way things are done in Unix

  8. A Quick Movie Clip To Motivate Us

  9. This Is NOT A Typical Unix System • Hollywood (and others) associate Unix with “smart” computer users • Unfortunately, Unix is not flashy • Nothing appealing about watching a command prompt • Navigating through a prompt would be much faster, but not nearly as exciting • Will knowledge of Unix help save you from rampaging dinosaurs?

  10. History Of Unix • Unix has been around in one form or another since 1969 (probably before any of us were born) • Why is it important to know the history? • Why hasn’t it disappeared? • What has fueled its growth?

  11. Today, Two Major Divisions Unix (1969) System V systems (1983) BSD systems (1978) Hurd HP-UX Mac OS X (Darwin) Linux IRIX FreeBSD Solaris

  12. A Family Tree • Display

  13. System V Versus BSD • If you know one, you can learn the other fairly quickly • Some programs have different flags and run in different ways • Some files are located in different areas • We will cover System V in this class (Linux in lab)

  14. 1969 – The Origin of Unix • Multics – a timesharing operating system that grew too complex for its own good • Timesharing was novel, as batch processing was the accepted norm • Ken Thompson of Bell Labs • Bell Labs withdrew from Multics support, and Ken lost a system to play “Space Travel,” a game he wrote • He wrote the first version of UNIX (UNICS) on a PDP-7 • Soon joined by Dennis Ritchie

  15. Computers of that age • No such thing as a video display • No keyboard as we know it • A teletype was used to communicate with the computer • Basically a glorified electronic typewriter

  16. PDP-7

  17. Unix features • From the very beginning, this was a programmer’s environment • Ability to code and test in one session • Interactive computing was stressed over batch processing • Batch processing involved coming up with a large volume of work that needed to be computed and feeding that work to the computer during your assigned time • Timesharing allows several programs to be run at once, although each takes a little more time

  18. 1970’s • 1971-1973: In order to have this OS on other systems, Thompson and Ritchie create C and rewrite the OS in C • Unix use slowly spreads among academic circles • 1977: First BSD release (source code included!) • SCO created in 1978

  19. The C Connection • From the early 1970’s, C and Unix have gone together • C was designed as a sort of “portable assembler” • Low level enough to do things fast • High level enough to be human readable • C remains the language of choice

  20. 1980’s – The Unix Wars • 1983 – Networking gets added to BSD • Sun Microsystems gets founded • Early idea was to create a perfect Unix system with networking built in and sell it • Department of Justice breaks up AT&T • AT&T rushed to commercialize System V • Source code was no longer free • Error 2: Focus on the wrong market • Every version of Unix started competing with every other version, and Microsoft took over

  21. 1985-93’s – FSF and Gnu • Once you give people something for free, they don’t want to have to pay for it • The Free Software Foundation (1985) • Gnu (Gnu’s not Unix) • Create free versions of popular tools (1986 – gcc, 1987 – most tools) • Overall goal was to develop a free kernel (It hadn’t happened by 1993) • Squabbling continued and Unix suffered

  22. Linux • In 1991, Linus Torvalds announced the Linux project • A free Unix kernel for x86 systems • Used Gnu tools from the very beginning • By 1993, Linux had both internet capability and X capability • Just in time for the big internet boom

  23. Linux’s Success • Internet culture and newsgroup postings caused a group of similar minded people to contribute and create a worthwhile kernel • A competing free attempt had problems • The free BSD attempt was mired in a lawsuit (3 files were copied illegally) • The Berkeley development group disbanded

  24. Free Software Foundation • Founded by Richard Stallman • Wrote original version of gcc and gdb • Software should be free, because it should be free • As in “free speech, not free beer” • Wrote the General Public License (GPL) • You are free to do whatever you want as long as the source code goes with it no matter what • Controversy: Anything derived from a GPL’d work must itself be GPL’d

  25. Open Source Movement • Software should be free just because – FSF viewpoint • Software should be free because free software is better – Open Source Movement viewpoint • Every problem can be eliminated if more people look at it

  26. The Hacker Connection • The entire history of Unix has been co-mingled with the history of hackers • The hacker mentality continues to drive the use and progress of Unix • Groups of people create and maintain Linux and BSD systems for fun (and to better their resume)

  27. Where Are We Today, And Where Are We Going? • The Single Unix Specification have been approved as an international standard • If a system wants to be called Unix, it has to conform to the guidelines in this standard • The open source movement continues to thrive and shows no slowing down • As anger and resentment for Microsoft continues (some unwarranted), people continue to look for a better alternative

  28. History of Hacker Culture • People have been tinkering and building for a long time • Cars, radios, woodworking, etc. • Why wouldn’t people tinker around with computers and operating systems? • You need the source code in order to tinker with an operating system • Hacking Unix is fun

  29. Important distinctions • Hacker • One who likes to build tools, programs, or systems for the fun of it • Enjoys stretching capabilities of systems rather than just doing the minimum necessary • Media’s use of the word: Evil man out to get you! • Cracker • One who breaks into systems with the express purpose of monetary gains or to cause trouble • Script kiddie: lowest form of cracker

  30. Some Handy Web Sites • Jargon file • All the definitions necessary for understanding the hacker culture • Slashdot.org • The site where information “that matters” is posted • Freshmeat.net • New tools and projects postings

  31. Hacker Mentality • Prefer an elegant solution to a kludge • Information sharing is a good goal • Not a necessary evil, but something to strive for • Some may exploit software to make the software better and not for personal gain

  32. Mentality Of Unix • Unix was designed with the K.I.S.S. principle • Keep It Simple, Stupid! • Why do something repetitive when you can automate? • Write scripts and programs for simple or commonly used tasks • Don’t overly complicate matters

  33. “Third System Effect” • First system: a simple prototype that is missing needed functionality • Second system: overly complex system that throws everything in • Multics was a second system • Collapses under its own weight • Third system: simple system with improved functionality

  34. ?? = Unix Commands Analogy • Do one thing, but do it well • Hidden menu is like command line options • Still getting a burger, just different

  35. Unix Versus Windows • Is Unix purposefully anti-GUI? • Not really… • Several window managers exist for X-windows • Basing an OS on a GUI makes it more complicated than it needs to be • Simple interfaces allow for different programs to easily communicate • Counterexample: How many different formats does Microsoft Word save as? How many of those can WordPad read correctly?

  36. Common Differences Between Unix And Windows • Registry • Unix programs keep track of their own files • GUI • Built on top of Unix • Built in the middle of Windows (recently) • Command line • In Unix, the main interface with a program • In Windows, barely supported if at all

  37. Multitasking/Multiuser (Multichoice) • Unix was always designed as a multiuser/multitasking system • More than one user can be logged on one machine at a time • More than one process can be running at one time (time sharing) • Many different ways exist to do things in Unix • Different graphical interfaces, different commands, etc.

  38. For more information • Read chapter 1 in the book • Read “In the Beginning was the Command Line” by Neal Stephenson • joesacher.com/documents/commandline.php • Visit www.faqs.org/docs/artu/ • Don’t worry about most of the book, but look at the philosophy and history sections

More Related