Assignments
Watch the 1982 short film, The UNIX System: Making Computers More Productive from the AT&T Tech Archives, which illustrates many of the groundbreaking contributions UNIX made to the world of computing–many of which we take for granted, today.
Read the The UNIX Time-Sharing System paper which describes the basic design of UNIX, in the creators’ own words.
Read the POSIX Shell Command Language, which details the design of the POSIX Shell.
Optional: Watch the film, Using a 1930 Teletype as a Linux Terminal, which demonstrates how a teletype machine can still interface with a modern Linux operating system due to the legacy terminal interface that it supports.
POSIX Standards
Ensure that you are referring to the POSIX.1-2008 version of the standard. Skim through the following sections, and be prepared to refer back to them throughout the course:
Within the Base Definitions volume, read:
Section 5: File Format Notation
Section 8: Environment Variables.
Skip 8.2 Internationalization Variables.
Section 9: Regular Expressions.
Skip 9.5 Regular Expression Grammar;
Section 11: General Terminal Interface
Skip 11.1.1 Opening a Terminal Device File. Managing terminals is an advanced topic.
Skip 11.1.3 The Controlling Terminal; a controlling terminal is just the terminal that a process is associated with. Managing terminals is an advanced topic.
In 11.2 Parameters that Can be Set, only read about the following important terminal mode flags:
11.2.2 Input Modes: BRKINT, IXANY, IXOFF, and IXON
11.2.5 Local Modes: ECHO, ICANON, and TOSTOP
Section 12: Utility Conventions
Within the Shell & Utilities volume, read:
Section 1.4: Utility Description Defaults
Man Pages
You will be required to read many man pages throughout this course. Always read manpages on the system you are programming on, since they are specific to a particular system and its software versions! Manpages are referenced in the form name(section) such as bash(1). To view a particular man page run the command man [section] name
. The section number is optional, and the man pager will select the first page it finds that matches the given page name, if omitted. The arguments to man are case-insensitive.
In general, skim over SYNOPSIS, OPTIONS, ENVIRONMENT sections, and ignore the VERSIONS, CONFORMING TO, AUTHORS sections. Any other sections should generally be read fully as they contain important information about usage, exit status or return value, and other important notes. It is important to learn how to quickly find relevant information in man pages, and the only way to do that is by practicing!
Read the man page for man itself, MAN(1) (
man 1 man
). This page explains in detail the functionalities that man offers as well as the basic layout of information in manpages. Pay close attention to the list of section numbers–you will want to remember these!Read the POSIX shell manpage, SH(1P) (
man 1p sh
). Skip the EXTENDED DESCRIPTION section; you won’t be using vi-mode. Bash and most other shells implement their own line editing functionality, usually based off emacs, that is more intuitive for modern users, using familiar control-character chords.
Notice that some man pages are in sections suffixed with “p”, such as “1p”. The “p” here means “POSIX”, and the man pages in these sections are verbatim duplicates of their corresponding sections in the POSIX standards. The non-“p” sections contain pages which are specific to that particular system’s implementations. So, for example, sh(1p) describes the POSIX shell, while sh(1) might describe the system’s installed shell implementation, such as bash or zsh. Generally, the “p” pages are used when writing software to be maximally portable across POSIX systems, while the non-“p” versions are used when working with software only on a particular system.
Also, when you are working on an assignment inside vim, you can easily open a manpage with vim’s internal manpage viewer with the :Man
command. Run :h Man
in vim to see more about its usage. Note that the :Man
command is capitalized in vim.