AI Hints
Home›Linux Tutorial›Making Folders and Files
Linux · Lesson 24 of 120

Practice: A Project Folder

Mkdir and touch together.

⏱ 2 min read▶ Video at 28:55🎓 Free
Watch this lesson in the Linux courseWatch on YouTube ↗Full Linux course

Let's put MK dir and touch together, and build the folder structure for a small website. Here's your task. Pause the video, and try it yourself first.

Practice: A Project Folder
From the video: Practice: A Project Folder
  • mkdir and touch together
  • A small website
  • Pause and try first

The task

Inside your home folder, make a folder called website. Inside it, make two folders, CSS, and images. Then create an empty index dot HTML in website, and an empty style dot CSS inside the CSS folder. Finally, show it all with tree.

website/the main folder
css/ and images/two folders inside
index.htmlin website
css/style.cssin css

One way to do it

Here's one solution. MK dir dash P creates website and both folders inside it, in one go. Touch creates both files, using paths. And tree shows the result. Two folders, and two empty files, exactly where we wanted them.

Terminal
mkdir -p website/css website/images
touch website/index.html website/css/style.css
tree website
website
├── css
│   └── style.css
├── images
└── index.html

3 directories, 2 files

Good naming habits

While you're building folders, a few habits help. Use lowercase names. Use dashes or underscores instead of spaces. Give files an extension like dot TXT, so people know what's inside. And keep names short, but clear.

keyvalue
Lowercasewebsite, not Website
No spacesmy-notes.txt
Extensions.txt, .html, .sh
Short and clearreport-2026.txt

Summary

You built a project structure with MK dir dash P and touch, and checked it with tree. Next, copying files.

Key takeaways
  • mkdir -p for folders
  • touch for files
  • tree to check
Next up: cp: Copying — files and folders