1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Shell

Exercise

How can I stop a running program?

The commands and scripts that you have run so far have all executed quickly, but some tasks will take minutes, hours, or even days to complete. You may also mistakenly put redirection in the middle of a pipeline, causing it to hang up. If you decide that you don't want a program to keep running, you can type Ctrl + C to end it. This is often written ^C in Unix documentation; note that the 'c' can be lower-case.

Instructions

100 XP

Run the command:

head

with no arguments (so that it waits for input that will never come) and then stop it by typing Ctrl + C.