CSC 173, Fall 2006

Getting Used to Your Linux Account

Most of you probably already have some experience with some variant of Unix, e.g. from turning in assignments for 172 last spring. For 173 we will be using the Linux machines in the Hylan 301 undergraduate lab, as described on the course resources page. Note that three high-end cycle servers are available for remote access from anywhere on the Internet.

If you are used to a PC or Macintosh environment, you will find Linux a little less "friendly". There are lots of window-based tools, and a nice desktop environment, but much of your work will happen via a command-line interface to a program called the "shell". A good place to start is the on-line help system: man (for "manual"). Type

      man man
  
and read what shows up. Then read the man pages for the following:
      cd
      pwd
      mkdir
      rm
      rmdir
      chmod
  
Note that the name .. (dot dot) can be used to refer to the parent of the current directory in the file system hierarchy.

Once you are comfortable moving around in directories and listing files, skim the man page for the default shell, csh. It has a lot of functionality -- more than you want to know about yet -- but you'll find it helpful over time to have a sense of what's available. At some point, for example, you'll want to learn about "job control", which allows you to have more than one program running simultaneously, under the control of a single shell.

Finally, you need to become proficient with one of the text editors. I strongly recommend emacs: it's the most powerful and popular of the Unix editors. It has a very steep learning curve, so expect to invest a lot of time getting used to it. Once you've made the investment, however, you won't want to go back to anything else.

Emacs has a good built-in help system. After you first start up, you can access a hands-on tutorial by typing M-h t (meta-h t). The meta key is a modifier, like control or shift. On some keyboards it's labeled alt or . If you don't have (or can't find) the meta key, you can type <esc> (escape) instead, as a prefix instead of a modifier: <esc> h t.

Once you've run the tutorial, you should check out texinfo mode, a more extensive help system built into emacs. Type

      M-x info <rtn>
  
to get into texinfo mode. They type
      m info <rtn>
  
to learn how to use texinfo itself. (That's "m" [for "menu item"], not meta.) Until you've learned the various texinfo browsing commands, know that <sp> will keep moving you forward through the material. From the same initial texinfo menu page, type
      m emacs <rtn>
  
to get documentation for emacs itself.

Two useful hints:

  1. Type C-g (control-g) to abort the current emacs command, whatever it is.
  2. Type C-x C-c (control-x followed by control-c) to quit the editor.

Back to the course home page

Last Change: 11 September 2006