Open Source Comes to Campus/Curriculum/Saturday/CLI

From OpenHatch wiki
Revision as of 22:54, 18 April 2012 by imported>Paulproteus (→‎Individual work)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Title

The command line, packages, and dependencies

Learning objectives

  • Have a general understanding of the meaning of frequently-seen paths: /usr /usr/bin /home etc.
  • Understand the purpose and basic use of package management tools.
  • Have familiarity with passing arguments to CLI programs (e.g., tar).
  • Preferably, understand that a text terminal can display "graphical" (e.g. via ncurses) programs.
  • Understand enough history of the command line to know it came "first", before GUIs.
  • Have enough understanding of the command line to succeed at the rest of the day's activities.
  • Become familiar with different ways of quitting command-line programs.

Lecture+demo portion suggested outline

  • Use a photo of teletypes connected to a serious UNIX server to explain what a "terminal" means, and why it's really a "terminal emulator".
  • Ask people what their experiences with the command line have been so far. (If necessary, skip pieces of the discussion.)
  • With a diagram of a directory hierarchy, discuss different paths like /home and /usr.
  • Explain the core concepts behind the filesystem hierarchy standard: what's available at boot, /usr vs. /.
  • Explain the concept of $PATH. Point out that "." is usually not in the path by default.
  • Split the screen into half Nautilus, half Terminal, and show how they are different views of the same thing.
  • Explain that programs like "apt-get" install software, and to demonstrate this, use apt-get on your own machine to install something.
    • Demonstrate where the resulting files went with dpkg -L.
    • Install something that puts its binary in /usr/sbin program, and show that it's not on the path by default, but can be run by specifying the path.
    • Maybe do the same for something in /usr/games.
  • Explain the concept of dependencies, both build-dependencies and runtime depencies, perhaps by showcasing a package via packages.debian.org or via apt-cache show + apt-cache showsrc.
  • Then, tell students to do the tasks in the "Individual work" section.

Individual work for students

  1. Ask students to work through the Six ways to quit tutorial, and talk with a TA or module leader once they have completed it.
  2. Ask students to work through the "Tar training mission". They start by visiting http://openhatch.org/missions/.

(Editor's note: In terms of assessment, this lesson's assessment is the student successfully completing the above.)

Prerequisites

  • Figure this out