The Unix Shell

The Unix shell has been around longer than most of its users have been alive. It has survived because it’s a powerful tool that allows users to perform complex and powerful tasks, often with just a few keystrokes or lines of code. It helps users automate repetitive tasks and easily combine smaller tasks into larger, more powerful workflows.

Use of the shell is fundamental to a wide range of advanced computing tasks, including high-performance computing. These lessons will introduce you to this powerful tool.

This lesson guides you through the basics of file systems and the shell. If you have stored files on a computer at all and recognize the word “file” and either “directory” or “folder” (two common words for the same thing), you’re ready for this lesson.

If you’re already comfortable manipulating files and directories, searching for files with grep and find, and writing simple loops and scripts, you probably want to explore the next lesson: Shell Extras

Contents

TutorialDescription
0. InstallationInstruction on setting up the exercise environment.
1. Introducing the ShellWhat is a command shell and why would I use one?
2. Navigating File and DirectoriesHow can I move around on computer?
How can I see what files and directories I have?
How can I specify the location of a file or directory on my computer?
3. Working with FIles and DirectoriesHow can I create, copy, and delete files and directories?
How can I edit files?
4. Pipes and FilterHow can I combine existing commands to do new things?
5. LoopsHow can I perform the same actions on many different files?
6. ScriptsHow can I save and re-use commands?
7. Finding ThingsHow can I find files?
How can I find things in files?
$. referenceSummary of keywords and topics covered