Lecture 01: Welcome and Intro What LSD and Unix Have in Common

Lecture 01: Welcome and Intro What LSD and Unix Have in Common

Lecture 01: welcome and intro what LSD and Unix have in common Hands-On Unix System Administration DeCal 2012-08-27 1 / 21 The connection ❖ The connection “Two of the most Introduction Diving into the shell famous products of Text editing Berkeley are LSD and Unix. I don’t think that this is a coincidence.” (from The Unix-Haters Handbook) 2 / 21 ❖ The connection Introduction ❖ What is this? ❖ Who are we? ❖ What is Unix? ❖ What is sysadmining? Introduction ❖ Logistics Diving into the shell Text editing 3 / 21 What is this? ❖ The connection ● CS 98/198-8, the Hands-on Unix Introduction ❖ What is this? system administration DeCal ❖ Who are we? ❖ What is Unix? ● decal.ocf.berkeley.edu ❖ What is sysadmining? ❖ Logistics ● Don’t be shy. Ask questions in class or Diving into the shell on Piazza. Text editing 4 / 21 Who are we? ❖ The connection ● Dara Adib: 3rd-year CivE; OCF general Introduction ❖ What is this? manager, Kloudless DevOps ❖ Who are we? ❖ What is Unix? ● Felix Wong: 4th-year EECS; OCF site ❖ What is sysadmining? ❖ Logistics manager, ResComp sysadmin Diving into the shell ● Jessica Yu: 3rd-year CS; ResComp Text editing sysadmin 5 / 21 What is Unix? ❖ The 1970 1980 1990 2000 Time connection FreeBSD 7.2 BSD family NetBSD 5.0 Introduction OpenBSD 4.5 ❖ What is this? BSD (Berkeley Software Distribution) Bill Joy ❖ Who are we? SunOS 4.1.3 ❖ Darwin What is NextStep 3.3 Unix? MacOS X 5.7 Xenix OS Apple Computer ❖ What is Microsoft/SCO GNU/Hurd K16 sysadmining? GNU Project ❖ Richard Stallman GNU/Linux 2.6.30.1 Logistics Minix Linus Torvalds 3.1.3a Andrew S. Tanenbaum Diving into the Research UNIX 10 shell Bell Labs: Ken Thompson, Dennis Ritchie, et al. Commercial UNIX UnixWare AT&T Univel/SCO Text editing Solaris 10 5/09 Sun Microsystems System III & V family HP-UX 11i v3 AIX 7.1.4 MP4 6.1 IBM IRIX 6.5.30 SGI https://en.wikipedia.org/wiki/File:Unix_history.svg 6 / 21 What is sysadmining? ❖ The connection Introduction ❖ What is this? ❖ Who are we? ❖ What is Unix? ❖ What is sysadmining? http://xkcd.com/705/ ❖ Logistics Diving into the shell Text editing 7 / 21 Logistics ❖ The connection ● lecture-lab format: lab due at start of Introduction ❖ What is this? next week’s class ❖ Who are we? ❖ What is Unix? ❖ What is ✦ lab 6= homework sysadmining? ❖ Logistics Diving into the shell ● grading: attendance, labs, final project Text editing ● bring laptop if possible 8 / 21 ❖ The connection Introduction Diving into the shell ❖ The shell ❖ In a nutshell ❖ Common Diving into the shell shells ❖ Basic programs ❖ Basic programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 9 / 21 The shell ❖ The connection ● an ordinary program (e.g., bash) that Introduction Diving into the lets you access the system shell ❖ The shell ❖ In a nutshell ✦ ❖ Common text-based shells ❖ Basic programs ❖ Basic ● programs edit files, run other programs, etc. ❖ Basic programs ❖ Saving ● can be automated with shell scripting keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 10 / 21 In a nutshell ❖ The connection ● there’s a prompt Introduction Diving into the shell ● type something ❖ The shell ❖ In a nutshell ❖ Common ● read output shells ❖ Basic programs ❖ Basic ● repeat programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 11 / 21 Common shells ❖ The connection ● sh/bash Introduction Diving into the shell ● csh/tcsh ❖ The shell ❖ In a nutshell ❖ Common ● zsh shells ❖ Basic programs ❖ Basic ● fish programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 12 / 21 Basic programs ❖ The connection ● pwd: print working directory Introduction Diving into the shell ● ls: list file ❖ The shell ❖ In a nutshell ❖ Common ● cd: change working directory shells ❖ Basic programs ❖ Basic ● mkdir: make directory programs ❖ Basic programs ● ❖ Saving rmdir: remove empty directory keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 13 / 21 Basic programs ❖ The connection ● touch: create/access file Introduction Diving into the shell ● mv: move file ❖ The shell ❖ In a nutshell ❖ Common ● cp shells : copy file ❖ Basic programs ❖ Basic ● rm: remove file programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 14 / 21 Basic programs ❖ The connection ● echo: print text Introduction Diving into the shell ● cat: print file ❖ The shell ❖ In a nutshell ❖ Common ● less (more): scroll (“page”) through shells ❖ Basic programs file ❖ Basic programs ❖ Basic ● grep: search file for specified pattern programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 15 / 21 Saving keystrokes ❖ The connection ● command history Introduction Diving into the shell ● tab-completion ❖ The shell ❖ In a nutshell ❖ Common shells ❖ Basic programs ❖ Basic programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 16 / 21 RTFM ❖ The connection ● programs have command line options. Introduction Diving into the shell ✦ e.g., ls -l ❖ The shell ❖ In a nutshell ❖ Common shells ❖ Basic ● programs are (usually) documented programs ❖ Basic programs ❖ Basic ✦ e.g., man ls, ls --help programs ❖ Saving keystrokes ❖ RTFM ● ❖ Unix paradox search manpages with apropos (or ❖ ls -l Google) Text editing 17 / 21 Unix paradox ❖ The connection Good Unix programs are Introduction Diving into the ● simple shell ❖ The shell ❖ In a nutshell ● ❖ Common do one thing well shells ❖ Basic programs “cat came back from Berkeley waving ❖ Basic programs ❖ Basic flags” (Rob Pike [Unix minimalist]) programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 18 / 21 ls -l ❖ The connection ● filenames preceded with a dot are Introduction Diving into the hidden by default shell ❖ The shell ❖ In a nutshell ✦ e.g., .bashrc ❖ Common shells ❖ Basic programs ❖ Basic ● programs special directories ❖ Basic programs ❖ Saving ✦ keystrokes . (one dot): current directory ❖ RTFM ❖ Unix paradox ✦ .. (two dots): parent directory ❖ ls -l Text editing 19 / 21 ❖ The connection Introduction Diving into the shell Text editing ❖ vi(m) Text editing 20 / 21 vi(m) ❖ The connection “I was trying to make it usable over a 300 Introduction baud modem” (Bill Joy [Berkeley graduate Diving into the shell student]) Text editing ❖ vi(m) ● modal text editor: normal mode, insert mode ● vimtutor 21 / 21.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    21 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us