Skip to content
ohsudo, Home

Module 1: First steps

Create, copy, move and delete: mkdir, touch, cp, mv, rm

These commands change things, and there's no recycle bin on the command line. It's safe to make mistakes here, and Start again puts everything back.

● Runs 100% in your browser. Nothing here can harm a real system.

Step 1 of 7

Make a folder

mkdir creates a folder.

Your task

Create a folder called backups in your home folder.

guest@ohsudo: ~ — Ubuntu 24.04

Starting the terminal…

What you'll practice

  1. Make a folder. mkdir creates a folder.
  2. Make an empty file. touch creates an empty file, if it isn't already there.
  3. Copy a file. cp copies: first what, then where. If the destination is a folder, the copy keeps its name.
  4. Rename a file. mv moves a file, and renaming is the same thing as moving it to a new name in the same folder.
  5. Delete a file. rm deletes a file right away. On a real system, it doesn't go to a trash folder, and you can't undo it.
  6. Make nested folders. Plain mkdir fails if the parent folders don't exist. -p creates all of them, and doesn't complain if they're already there.
  7. Delete a folder. rm -r deletes a folder and everything in it. This is the command to slow down for: read the path twice before pressing Enter.

See also