Skip to content
Computer Science · Grade 9

Active learning ideas

Basic Command Line Interface (CLI)

Active learning through hands-on terminal work builds durable CLI skills. Students retain commands like mkdir and rm only after immediate, repeated practice where errors produce instant feedback. This activity hub turns abstract commands into physical movements and collaborative problem-solving to strengthen both memory and confidence.

Ontario Curriculum ExpectationsCS.HS.AP.5CS.HS.CT.6
20–40 minPairs → Whole Class4 activities

Activity 01

Experiential Learning35 min · Individual

CLI Scavenger Hunt: File Navigation Challenge

Provide students with a list of 10 tasks, such as finding a hidden file, creating a nested directory, and listing contents recursively. Students enter commands in their terminals and screenshot successes. Circulate to troubleshoot common errors like forgetting spaces.

Explain the advantages of using a command-line interface for certain tasks.

Facilitation TipDuring the CLI Scavenger Hunt, circulate with a printed directory map for students to mark off each completed path, ensuring no one gets lost and all commands are recorded.

What to look forProvide students with a scenario: 'You need to create a new folder named 'Projects' inside your 'Documents' folder, and then create a file named 'report.txt' inside 'Projects'. Write the sequence of CLI commands to accomplish this.' Collect responses to check command construction.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

Activity 02

Experiential Learning25 min · Pairs

Pairs Relay: Directory Builder

Pairs take turns entering commands to build a specific directory tree from a diagram, like mkdir project/docs/images. Partner checks output with ls -R before switching. First pair to match the tree wins a point.

Compare file system navigation in a GUI versus a CLI.

Facilitation TipIn the Pairs Relay: Directory Builder, enforce strict turn-taking so both partners articulate each command aloud before execution, reinforcing verbalization of thought processes.

What to look forAsk students to open a terminal and execute the 'pwd' command. Then, instruct them to navigate to a specific directory (e.g., 'Desktop') using 'cd' and list its contents using 'ls'. Observe student screens or ask them to report their output to verify navigation skills.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

Activity 03

Experiential Learning40 min · Small Groups

Small Groups: Command Customization

Groups receive a scenario, such as organizing class files by date. They research and combine commands like mkdir and mv, then demo their solution to the class. Debrief on efficiency gains over GUI drags.

Construct basic commands to manage files and directories.

Facilitation TipFor Small Groups: Command Customization, provide a one-page cheat sheet with only command syntax and flags, forcing students to rely on memory for flags beyond basic commands.

What to look forPose the question: 'Imagine you have 100 photos in a folder that you need to rename by adding the prefix 'Vacation_' to each. How might using the CLI be more efficient than doing this manually in a GUI? What specific CLI commands or concepts might help?' Facilitate a brief class discussion.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

Activity 04

Experiential Learning20 min · Whole Class

Whole Class: Error Hunt Kahoot

Display buggy command sequences on screen. Class votes on fixes via Kahoot, then tests in terminals. Review syntax rules like case sensitivity and flags.

Explain the advantages of using a command-line interface for certain tasks.

Facilitation TipRun the Whole Class: Error Hunt Kahoot immediately after new commands are introduced to surface misunderstandings before they become habits.

What to look forProvide students with a scenario: 'You need to create a new folder named 'Projects' inside your 'Documents' folder, and then create a file named 'report.txt' inside 'Projects'. Write the sequence of CLI commands to accomplish this.' Collect responses to check command construction.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

A few notes on teaching this unit

Teach CLI as a language with grammar rules, not a tool with buttons. Model clear pronunciation of commands aloud, emphasizing spacing and case, to mirror how students should speak to themselves while troubleshooting. Avoid immediate answers; instead, scaffold with questions like 'What does the error message tell you?' to develop self-diagnosis skills. Research shows that interleaving CLI practice with GUI comparisons deepens transfer, so alternate activities between terminal tasks and GUI reflections every 15 minutes.

By the end of these activities, students will independently navigate directories, construct correct command sequences, and articulate why CLI commands are case-sensitive and positional. They will also justify CLI efficiency in real-world file management tasks through concrete comparisons with GUI workflows.


Watch Out for These Misconceptions

  • During the CLI Scavenger Hunt, watch for students assuming CLI is always slower than GUI.

    Use the scavenger hunt’s timed checkpoints to measure bulk operations. For example, time how long it takes students to create 20 folders using mkdir versus GUI methods, then have them record the difference on a shared whiteboard.

  • During the Whole Class: Error Hunt Kahoot, watch for students treating commands as case-insensitive.

    Include a Kahoot question where the correct command is 'ls -l' and a distractor is 'LS -L'. After revealing the answer, ask students to explain why case matters in a one-sentence exit ticket.

  • During Small Groups: Command Customization, watch for students believing CLI cannot handle complex file management.

    Provide a scenario with nested folders and ask groups to design a single command sequence using rm -r and mkdir to replicate a GUI drag-and-drop operation, then present their solutions to the class.


Methods used in this brief