Ready for Linux

Switch with confidence

Course overview · By Ready for Linux

Linux Shell Essentials: Files and Directories

Bash is a shell: a program that reads commands and runs tools. Once you can navigate, the next step is making deliberate changes. Shell Essentials builds a small workspace across guided stages, then asks you to prepare a project handoff independently. Exercises use real Bash in a browser workspace.

Before you begin

You should be comfortable with pwd, ls, cd, and simple paths. Try the free Terminal Navigation lessons first if those commands are new. The Bash exercises require an account and an active course pass.

What you will learn

  • Recover from command errors and unfinished input.
  • Create directories and empty files with mkdir and touch.
  • Write text with printf and output redirection.
  • Keep filenames with spaces together using quotes.
  • Copy, move, inspect, and deliberately remove files.
  • Prepare a handoff that meets a set of file requirements.

Create a small practice workspace

mkdir shell-practice
cd shell-practice
touch notes.txt
printf '%s\n' 'First practice note' > notes.txt
cat notes.txt

Run this in a disposable directory where shell-practice does not already exist. mkdir creates the folder; touch creates an empty file. printf writes a line, and > sends that output into notes.txt. Redirection replaces the file's previous contents, so inspect filenames before using it. cat reads the saved note back so you can verify the result.

Course syllabus

10 lessons, from guided practice to an independent challenge.

  1. Make the shell do something

    Meet Bash and create your first empty file with touch. Course access required

  2. Recover and try again

    Read an error, correct a command and leave unfinished input without losing your files. Course access required

  3. Build a useful workspace

    Prepare directories for a small project using mkdir. Course access required

  4. Put text into a file

    Use printf to write a line, then save its output with >. Course access required

  5. Write a note you can read back

    Write a short project note and inspect its contents. Course access required

  6. Keep a filename together

    Use quotes or an escaped space to pass a filename as one argument. Course access required

  7. Keep an original and make a copy

    Copy a project brief without changing its original. Course access required

  8. Put files where they belong

    Move a file out of an inbox and give it a useful name. Course access required

  9. Remove only what you mean to remove

    Inspect a scratch file, delete that exact file, and preserve the useful note. Course access required

  10. Prepare a project handoff

    Combine your file skills in an independent project handoff. Course access required

Put it into practice

Use the guided lessons to build these skills one at a time. After you can navigate, write, and inspect files, you can start combining commands into a Bash script.

Continue learning

Bash Scripting: Build Repeatable Linux Workflows · Explore the full syllabus

Reference: GNU Bash manual: shell commands and redirections.