lecture 01 welcome and intro what lsd and unix have in
play

Lecture 01: welcome and intro what LSD and Unix have in common - PowerPoint PPT Presentation

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 Two of the most The connection Introduction famous products of Diving into the shell


  1. Lecture 01: welcome and intro what LSD and Unix have in common Hands-On Unix System Administration DeCal 2012-08-27 1 / 21

  2. The connection “Two of the most ❖ The connection Introduction famous products of Diving into the shell Berkeley are LSD and Text editing Unix. I don’t think that this is a coincidence.” (from The Unix-Haters Handbook ) 2 / 21

  3. ❖ The connection Introduction ❖ What is this? ❖ Who are we? ❖ What is Unix? Introduction ❖ What is sysadmining? ❖ Logistics Diving into the shell Text editing 3 / 21

  4. What is this? ❖ The ● CS 98/198-8, the Hands-on Unix connection Introduction system administration DeCal ❖ What is this? ❖ Who are we? ❖ What is ● decal.ocf.berkeley.edu Unix? ❖ What is sysadmining? ❖ Logistics ● Don’t be shy. Ask questions in class or Diving into the shell on Piazza. Text editing 4 / 21

  5. Who are we? ❖ The ● Dara Adib: 3rd-year CivE; OCF general connection Introduction manager, Kloudless DevOps ❖ What is this? ❖ Who are we? ❖ What is ● Felix Wong: 4th-year EECS; OCF site Unix? ❖ What is manager, ResComp sysadmin sysadmining? ❖ Logistics Diving into the ● Jessica Yu: 3rd-year CS; ResComp shell Text editing sysadmin 5 / 21

  6. What is Unix? ❖ The Time 1970 1980 1990 2000 connection FreeBSD 7.2 NetBSD 5.0 BSD family Introduction OpenBSD 4.5 ❖ What is this? BSD (Berkeley Software Distribution) ❖ Who are we? Bill Joy SunOS 4.1.3 ❖ What is Darwin NextStep 3.3 Unix? MacOS X 5.7 Xenix OS Apple Computer ❖ What is Microsoft/SCO GNU/Hurd K16 sysadmining? GNU Project GNU/Linux 2.6.30.1 Richard Stallman ❖ Logistics Linus Torvalds Minix 3.1.3a Andrew S. Tanenbaum Diving into the Research UNIX 10 shell Bell Labs: Ken Thompson, Commercial UNIX UnixWare Dennis Ritchie, et al. Univel/SCO AT&T Text editing Solaris 10 5/09 Sun Microsystems System III & V family 11i v3 HP-UX AIX 7.1.4 MP4 6.1 IBM 6.5.30 IRIX SGI https://en.wikipedia.org/wiki/File:Unix_history.svg 6 / 21

  7. 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

  8. Logistics ❖ The ● lecture-lab format: lab due at start of connection Introduction next week’s class ❖ What is this? ❖ Who are we? ❖ What is ✦ lab � = homework Unix? ❖ What is sysadmining? ❖ Logistics Diving into the ● grading: attendance, labs, final project shell Text editing ● bring laptop if possible 8 / 21

  9. ❖ The connection Introduction Diving into the shell ❖ The shell Diving into the shell ❖ In a nut shell ❖ Common shells ❖ Basic programs ❖ Basic programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 9 / 21

  10. The shell ❖ The ● an ordinary program (e.g., bash ) that connection Introduction lets you access the system Diving into the shell ❖ The shell ✦ text-based ❖ In a nut shell ❖ Common shells ❖ Basic programs ● edit files, run other programs, etc. ❖ Basic programs ❖ Basic programs ● can be automated with shell scripting ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 10 / 21

  11. In a nutshell ❖ The ● there’s a prompt connection Introduction Diving into the ● type something shell ❖ The shell ❖ In a nut shell ● read output ❖ Common shells ❖ Basic programs ● repeat ❖ Basic programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 11 / 21

  12. Common shells ❖ The ● sh / bash connection Introduction Diving into the ● csh / tcsh shell ❖ The shell ❖ In a nut shell ● zsh ❖ Common shells ❖ Basic programs ● fish ❖ Basic programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 12 / 21

  13. Basic programs ❖ The ● pwd : print working directory connection Introduction ● ls : list file Diving into the shell ❖ The shell ❖ In a nut shell ● cd : change working directory ❖ Common shells ❖ Basic programs ● mkdir : make directory ❖ Basic programs ❖ Basic ● rmdir : remove empty directory programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 13 / 21

  14. Basic programs ❖ The ● touch : create/access file connection Introduction Diving into the ● mv : move file shell ❖ The shell ❖ In a nut shell ● cp : copy file ❖ Common shells ❖ Basic programs ● rm : remove file ❖ Basic programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 14 / 21

  15. Basic programs ❖ The ● echo : print text connection Introduction ● cat : print file Diving into the shell ❖ The shell ❖ In a nut shell ● less ( more ): scroll (“page”) through ❖ Common shells ❖ Basic file programs ❖ Basic programs ● grep : search file for specified pattern ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 15 / 21

  16. Saving keystrokes ❖ The ● command history connection Introduction Diving into the ● tab-completion shell ❖ The shell ❖ In a nut shell ❖ Common shells ❖ Basic programs ❖ Basic programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 16 / 21

  17. RTFM ❖ The ● programs have command line options. connection Introduction Diving into the ✦ e.g., ls -l shell ❖ The shell ❖ In a nut shell ❖ Common shells ● programs are (usually) documented ❖ Basic programs ❖ Basic programs ✦ e.g., man ls , ls --help ❖ Basic programs ❖ Saving keystrokes ● search manpages with apropos (or ❖ RTFM ❖ Unix paradox ❖ ls -l Google) Text editing 17 / 21

  18. Unix paradox ❖ The Good Unix programs are connection Introduction ● simple Diving into the shell ❖ The shell ● do one thing well ❖ In a nut shell ❖ Common shells ❖ Basic “ cat came back from Berkeley waving programs ❖ Basic flags” (Rob Pike [Unix minimalist]) programs ❖ Basic programs ❖ Saving keystrokes ❖ RTFM ❖ Unix paradox ❖ ls -l Text editing 18 / 21

  19. ls -l ❖ The ● filenames preceded with a dot are connection Introduction hidden by default Diving into the shell ❖ The shell ✦ e.g., .bashrc ❖ In a nut shell ❖ Common shells ❖ Basic programs ● special directories ❖ Basic programs ❖ Basic programs ✦ . (one dot): current directory ❖ Saving keystrokes ❖ RTFM ✦ .. (two dots): parent directory ❖ Unix paradox ❖ ls -l Text editing 19 / 21

  20. ❖ The connection Introduction Diving into the shell Text editing Text editing ❖ vi(m) 20 / 21

  21. vi(m) ❖ The “I was trying to make it usable over a 300 connection baud modem” (Bill Joy [Berkeley graduate Introduction Diving into the student]) shell Text editing ❖ vi(m) ● modal text editor: normal mode, insert mode ● vimtutor 21 / 21

Recommend


More recommend