These days, it’s not uncommon for users of operating systems like Windows and OS X to have little or no experience using a command-line interface (sometimes referred to as a shell) to the operating system. Even for Linux users, GUI distributions such as Ubuntu make it easy to avoid the command line almost entirely. However, as developers, we often need to interact with the operating system, and with the tools we use, on a lower level than most users. Of course, much of our software development time is spent with integrated development environments (IDEs), which are designed to support writing, compiling, testing, and debugging code using a single, coherent (more or less) tool set. Nonetheless, there are times when we need to work with a command line—not just because command-line tools allow us to work with a wide variety of systems (including those we connect to remotely) in a reasonably consistent manner, but also because doing so gives us a level of control and flexibility that aren’t easily matched in a GUI.

Over the course of this bootcamp, we’ll learn to control Git, Java, Ant, and other tools from the command line. For now, we’ll focus on a few common tasks. Please read the pages linked below carefully.

Important: When you are instructed to type a command, please do so carefully and exactly as instructed.

(Under construction)

  • Copying files or directories
  • Moving/renaming files or directories
  • Deleting files or directories
  • Running a program
  • Redirection

Note that this section is neither a comprehensive reference to the commands for these operations, nor even an in-depth tutorial. Instead, it is intended as a simple introduction, with some basic tutorial exercises. On Unix-based systems (such as OS X and Linux Ubuntu), there are manual pages accessible (using the man command) from the command line for all of these commands. Additionally, all of the Unix commands used here support the --help option for displaying the basic syntax and list of supported options; on Windows, all of the commands in this section support the /? option for the same type of usage display.

An invaluable resource for several different command-line interfaces and shells—as well as the most common scripting languages and constructs used in these shells—is SS64—Command line reference.