$
Learn Linux handbook
en
XP:0
Quest 12Creator
+150 XP

Creating Empty Files

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

Imagine wanting to start writing a new journal entry, but first you need a blank piece of paper. In Linux, we grab a fresh, empty text file using the touch command.

- The touch command creates a brand new, empty file if it doesn't exist yet (like running touch draft.txt to create draft.txt). If the file already exists, it simply updates the file's "last modified" timestamp without changing its contents. Let's put a file in our new projects folder.

Let's create a blank slate. Create an empty file named task.txt inside the projects folder (either enter the folder first or use touch projects/task.txt).

Command Syntax Reference

Command / SyntaxDescription
cd projectsEnter the projects folder
touch task.txtCreate file task.txt

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Use the "touch" command
  • ○
    Create file "task.txt" inside "projects"

Ready to complete Quest 12?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.