Find us on GitHub

Teaching basic lab skills
for research computing

The Unix Shell

The Unix shell is older than most of the people who use it. It has survived so long because it is one of the most productive programming environments ever created—maybe even the most productive. Its syntax may be cryptic, but people who have mastered it can experiment with different commands interactively, then use what they have learned to automate their work.

  • The shell is an interactive interpreter: it reads commands, finds the corresponding programs, runs them, and displays output.
  • Output can be redirected using > and <.
  • Commands can be combined using pipelines.
  • The history command can be used to view and repeat previous operations, while tab completion can be used to save re-typing.
  • Directories (or folders) are nested to organize information hierarchically.
  • Use grep to find things in files, and find to find files themselves.
  • Programs can be paused, run in the background, or run on remote machines.
  • The shell has variables like any other program, and these can be used to control how it behaves.
  1. Introduction
  2. Files and Directories
  3. Creating and Deleting
  4. Pipes and Filters
  5. Permissions
  6. Finding Things
  7. Job Control
  8. Variables
  9. Secure Shell
  10. Advanced Tricks