How to Use mkdir Like a Pro on Linux and Ubuntu

How to Use mkdir Like a Pro on Linux and Ubuntu

Written By
i
iDoLinux
Feb 26, 2026

If you’ve spent any time in a Linux or Ubuntu terminal, you’ve already met mkdir. It’s usually one of the first commands people learn, right after ls and cd. Most tutorials stop at “mkdir folder_name” and move on — but mkdir can do a lot more.

In this article, I want to go deeper and show you how to use mkdir like a pro. This is a practical, hands-on guide, written from daily Linux usage, not just theory. We’ll start with the basics and then move into advanced usage, including permissions, modes, regex-style expansions, and building entire directory trees with a single command.

i

iDoLinux

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.