Note that this site is in currently in version 1.0.0-alpha. Some functionality may be limited.
If asked to show someone who has never seen a computer how to do something on your computer, many of us would explain what a screen and a cursor are, and then show how to point and click on icons. This approach relies on a graphical user interface, or GUI (pronounced “gooey!”). Today we’re going to explore another way to make your computer do things: through the command line. Instead of pointing and clicking, we’ll be typing in either git bash (Windows) or terminal (macOS) to tell the computer directly what task we’d like it to perform.
In this workshop, you will learn to:
Create and sort cheat sheets for the commands we learn
Explore a comma separated values (.csv) dataset using word and line counts, head and tail, and the concatenate command cat
Learn commands to create directories (mkdir)
Learn common commands to create files (touch and echo)
Move content from one place to another using redirects (>) and pipes (|)
Navigate our file structure using change directory (cd), print working directory (pwd), and list (ls)
In this section, we want to introduce some central steps that you want to take before you get started with this workshop. For instance, there are workshop suggestions that you may want to engage with before you start this workshop, some required or recommended software installations, some files from external sources to download, etc.
Sometimes, we ask you to complete a short task on an external website before you start the workshop. This can be because we want you to work on a particular dataset that you download here, or because we want you to sign up for a service. Note that these links will take you out of our website, so we will open them in a new tab for you. Once you are done, you can close down the window and easily return here.
This is another list of commonly used commands in the command line. It’s useful, but can be a little overwhelming if you don’t have any exposure to these things beforehand. Don’t worry, we will cover the most important ones in our Introduction to Command Line workshop!
Some software is required for you to participate in this workshop, other is recommended. This is a list of the prerequisite installations that are required of you, a link to each of their instructions (your operating system should have been highlighted below, as long as we have them available) and an indication as to whether it is required or not.
Git (and Git Bash)Required
If you’re using Windows, you will need to follow the instructions to install so that we can work in the cross-platform Unix command line for this session. If you’re using macOS, however, you do not need to take any action. The built-in Terminal application has all the functionality we need.
Why am I learning this? Why does it matter? How will it help my project? Learning new digital skills is an investment of your valuable time, so it is reasonable to want to know—essentially—what will I get out of taking this workshop? The materials below help situate the skills you are about to learn within a larger context of how they are used, by whom, and to what ends.
Digital tools and the skills required to use them are part of our culture and, therefore, never neutral. Digital humanists and social scientists consider the ethical challenges and responsibilities of the tools and methods that they use. The following materials are designed to introduce you to issues you may want to consider as you learn this new skill and decide how to integrate it into your own research and teaching.
“The command line” is laden with masculine and military metaphors, which is reflective of the history of computing and programming. As Wendy Hui Kyong Chun discusses in “On Software, or the Persistence of Visual Knowledge” (2004), almost all computers (as in human computers) in the US during World War II were young women. Human computers received commands from analysts—predominantly men with the military—that they then had to interpret and act upon the machine. As Chun (p. 34) argued, “computation depends on ‘yes, sir’ in response to short declarative sentences and imperatives that are in essence commands … The command line is a mere operating system (OS) simulation.” If commands are the ways in which a user communicates with machines, the command line (of computers today) receives these commands as text that is typed in.
Readings before you get started
The readings listed below situate what you are about to learn in cultural contexts, such as a particular humanities or social science field, the information or computer sciences, or popular discourse. The purpose of the readings is to provide a theoretical framework you can use to contextualize how you intend to use the skill or tool introduced in this workshop.
Douglas Rushkoff’s Program or Be Programmed offers some reflections on how using the command line allows one to communicate in a less mediated way with their machines and the importance of doing so in the current technoscape.
Projects related to Introduction to the Command Line
The following are sample projects that use the skill or tool (either implicitly or explicitly) that you are about to learn. Some skills that are foundational may seem not to lead to a specific project goal that you have in mind. You might be surprised to learn that the following projects depend on the skills learned in this workshop.
and R-based projects will require you to have some knowledge of the command line. At a very basic level, you will be invoking a Python script and will be using values of command line arguments when creating and running your scripts.
The command line is useful for setting up installations of server-side software (or more advanced software-as-a-service software, sometimes acronymized as SaaS). Omeka is merely one example. The command line will allow you to navigate the file structure of your server. Commands like ls, mkdir, rmdir, cd, etc. are really important. For example, grep could help you find a plugin directory that you might have accidentally placed in the wrong location.
Stefano Morello is a doctoral candidate in English with a certificate in American Studies at The Graduate Center, CUNY. His academic interests include American Studies, pop culture, poetics, and digital humanities. His dissertation, “Let’s Make a Scene! East Bay Punk and Subcultural Worlding,” explores the heterotopic space of the East Bay punk scene, its modes of resistance and (dis-)association, and the clashes between its politics and aesthetics. He serves as co-chair of the Graduate Forum of the Italian Association for American Studies (AISNA) and is a founding editor of its journal, JAm It! (Journal of American Studies in Italy). As a digital humanist, Stefano focuses on archival practices with a knack for archival pedagogy and public-facing initiatives. He created the East Bay Punk Digital Archive, an open access archive of East Bay punk-zines, and worked as a curator and consultant for Lawrence Livermore’s archive at Cornell University. He was a Wellcome Trust Transdisciplinary Fellow in 2019-2020.