Open Source Comes to Campus/Curriculum/Saturday/CLI: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Paulproteus
imported>Paulproteus
 
(9 intermediate revisions by the same user not shown)
Line 5: Line 5:
=== Learning objectives ===
=== Learning objectives ===


* Have a general understanding of the meaning of frequently-seen paths: /usr /usr/bin /home etc.
Have a general understanding of what paths mean (/usr /usr/bin /home etc.). Understand the purpose and basic use of package management tools. Understand how to "cd" and "ls" around in a terminal. 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.
* 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 portion ===
=== Lecture+demo portion suggested outline ===


* Use a photo of teletypes connected to a serious UNIX server to explain what a "terminal" means.
* 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.)
* 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.
* With a diagram of a directory hierarchy, discuss different paths like /home and /usr.
* Explain the concept of "PATH". Point out that "." is usually not in the path by default.
* 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.
* 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 the presentation machine to install something. Demonstrate where the resulting files went with dpkg -L. (Try to include a surprise /usr/sbin program.) Try executing a binary that got installed, and point out its location. Use apt-get remove to remove it. Point out that "yum" and "port" are similar tools.
* 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 ===
=== Individual work for students ===


=== Assessment elements ===


# Ask students to work through the [[/Six ways to quit|Six ways to quit]] tutorial, and talk with a TA or module leader once they have completed it.
# Visit http://openhatch.org/missions/ and go all the way through the "tar" training mission.
# Ask students to work through the "Tar training mission". They start by visiting http://openhatch.org/missions/.
# Visit [[/Six ways to quit|Six ways to quit]] and learn a variety of ways to quit things!


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

Possible problems

* Some students might already be extremely familiar with this material. It'd be nice to have some "extra credit".


=== Prerequisites ===
=== Prerequisites ===

Latest revision as of 22:54, 18 April 2012

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