Learn the Terminal and the Command Line

Terminal and Command Line is a beginner-level course of 5 lessons (about 2 h 20 min), with 15 exercises and 15 quiz questions. No prerequisites. The course needs a full project environment, planned for a later phase of the platform.

  • Foundations
  • Beginner
  • 5 lessons
  • 2 h 20 min
  • 15 exercises
  • Full project environment (phase 2)

The course in brief

The terminal is the everyday work tool of developers and data scientists. This course teaches you to navigate files, manipulate them, search for information, combine commands with pipes and automate tasks with bash scripts. Exercises are done in a real Linux terminal.

What you will be able to do

  • Navigate a directory tree using absolute and relative paths
  • Create, copy, move and delete files safely
  • Search for text and files with grep and find
  • Combine commands with redirections and pipes
  • Write a bash script with arguments, conditions and loops
  • Understand permissions, environment variables and the PATH

Syllabus: 5 lessons

    • Understand the role of the terminal and the shell
    • Read the command prompt and the structure of a command
    • Navigate the directory tree with pwd, ls and cd

    Terminal and shellNavigationAbsolute and relative paths

  1. 02

    Create, copy, move and delete

    15 min
    • Create directories and files
    • Copy, move and rename files
    • Delete safely and use wildcards

    File managementWildcards (globbing)

  2. 03

    Reading files and finding information

    15 min
    • Display all or part of a text file
    • Search for text with grep
    • Find files with find

    Reading filesSearching with grepFinding files with find

  3. 04

    Redirections and pipes: combining commands

    15 min
    • Redirect a command's output to a file
    • Chain commands with the pipe
    • Build a small data-processing job in one line

    RedirectionsPipes

  4. 05

    Scripts, permissions and environment variables

    20 min
    • Write and run a simple bash script
    • Read and modify a file's permissions
    • Understand environment variables and the PATH

    Bash scriptsPermissionsEnvironment variables

Final project

Script to tidy up and report on a working directory

Write a bash script `ranger.sh` that takes a directory as an argument, creates subdirectories by file type (donnees for .csv, documents for .md and .txt, logs for .log), moves the matching files into them, then produces a rapport.txt file showing the number of files per category and the number of lines containing ERROR in the logs.

Deliverables

  • The ranger.sh script, executable, with shebang and set -euo pipefail
  • A set of test files created by a command or a second script
  • The rapport.txt file generated by the script
  • A short README explaining usage and an example run

Assessment criteria

  • The script checks that the argument is present and otherwise prints a usage message on stderr
  • Variables are quoted and file names with spaces are handled
  • No file is lost or overwritten (mv -n or a prior check)
  • The report is produced with correct redirections and pipes
  • The script can be rerun without error on an already tidied directory

Frequently asked questions

Does this course work on Windows?

Exercises are done in an online Linux terminal. On your own Windows machine, you can use WSL or Git Bash to get the same commands. On macOS, the terminal (zsh) accepts the commands in the course.

What is the difference between a terminal, a shell and bash?

The terminal is the window that displays text; the shell is the program that interprets commands; bash and zsh are two widely used shells.

Is there a risk of damaging my computer?

Exercises take place in an isolated environment. The course stresses good practices (check with ls before rm, avoid reaching for sudo by reflex) so you can then work safely on your own machine.

Why learn the terminal for data or web work?

Git, Python, npm, Docker and servers are all driven from the command line. Knowing how to read logs, inspect a CSV or automate a task saves a considerable amount of time.

This course, told for your job

Say what you want to be able to do: “Terminal and Command Line” takes its place in your path, with examples from your field. The concepts stay those of the course.

The preview is free, and you can take the courses one at a time without paying. The path only contains lessons from the catalogue.