Section outline

Main course page

  • In this unit we're going to learn what the command-line shell is, how to use it efficiently, and how to perform basic text editing with it.
    Relevant links:

    Unit playlist
    ------------------

    • In this video we will learn about executing programs like 'echo' to print strings on the screen, 'cat' to print files, and 'man' to read manuals.
      We will also use '&' to run multiple programs at the same time, and use 'Ctrl+c' to quit the currently running program.
      Update: when the video was recorded, the university used the "tcsh" shell, but now we are using the "zsh" shell.
      This will only make a difference when we get to unit 5.
      Optional reading material:
      What the command-line shell is, and command structure

    • Let's get some important things down before we proceed.
      Optional reading material:
      A cheatsheet that contains useful shell commands and tricks

    • In this video we'll see tricks that help use the shell efficiently like:
      - Using the 'tab' button to automatically complete commands.
      - Using wildcards like '*' and '?', and multiple option expansions using '{option1, option2, ...}'.
      - Using 'history', '!', '!!', and '!$' to reference previous commands and parameters.

      You may ask - why bother with such "tricks" when we still haven't seen the basics?
      Well, these techniques are precisely the reason we want to use the command-line shell!
      These tricks help us perform complex operations very quickly.

    • We'll learn basic text editing and file manipulation using 'cat', 'touch', 'echo', 'diff', 'Emacs' and 'Vim'.
      Optional reading material:
      Vim cheat-sheet
      Emacs tutorial

    • In this nice quiz we'll see some more cool examples of using wildcards, and even learn a few new tricks!

    • Meme for finishing this unit Page

      Once you finish this unit, you'll be able to open this page and see a meme!