- 01Getting Started
- 02What Is a Terminal?
- 03Checking Where You Are with pwd
- 04Checking Contents with ls
- 05Seeing Hidden Files Too with ls -la
- 06Moving Around with cd
- 07Creating a Folder with mkdir
- 08Creating a File with touch
- 09Viewing a File's Contents with cat
- 10Displaying and Writing Text with echo
- 11Searching Text with grep
- 12Copying and Moving with cp / mv
- 13Deleting with rm (Use Caution!)
- 14Checking Who You Are with whoami
- 15Changing File Permissions with chmod
- 16Finding Files with find
- 17Viewing Part of a File with head/tail
- 18Counting Lines & Characters with wc
- 19Viewing Running Processes with ps
- 20Ending a Process with kill
- 21Checking Free Disk Space with df
- 22Checking a Folder's Usage with du
- 23Sorting a File's Lines with sort
- 24Merging Duplicate Lines with uniq
- 25Extracting a Column with cut
- 26Viewing Command History with history
- 27Reading a Command's Manual with man
- 28Creating a Symbolic Link with ln -s
- 29Bundling Files with tar
- 30Replacing Text in a File with sed
- 31Finding a Command's Location with which
- 32Setting Environment Variables with export
- 33Checking Environment Variables with printenv
- 34Giving a Command a Nickname with alias
- 35Extracting a Column with awk
- 36Checking System State with top
- 37Making a Request to a URL with curl
- 38Checking a Server's Reachability with ping
- 39Connecting to a Remote Server with ssh
- 40Changing a File's Owner with chown
- 41Comparing Two Files with diff
- 42Checking the Current Date and Time with date
- 43Checking Your Computer's Name with hostname
- 44Replacing Characters with tr
- 45Displaying with Line Numbers Using nl
- 46Extracting Just the Filename with basename
- 47Extracting Just the Folder Part with dirname
- 48Generating a Sequence with seq
- 49Checking Your User Info with id
- 50Checking Memory Usage with free
- 51Checking Server Uptime with uptime
- 52Doing Simple Math with expr
- 53Listing Environment Variables with env
- 54Checking a File's Details with stat
- 55Repeating a String with yes
- 56Creating Nested Directories at Once with mkdir -p
- 57Clearing Command History with history -c
- 58Checking a Command's Type with type
- 59Reversing Text with rev
- 60Formatting Output with printf
- 61Making Usage Human-Readable with du -h
Creating a Folder with mkdir
mkdir is for when "I want to create a new folder." mkdir stands for Make Directory, and it creates a new folder (directory) with the given name.
Use it in the form mkdir folder-name. Give multiple folder names separated by spaces, and you can create several folders at once.
Running mkdir images creates an empty folder named images in your current location. You can confirm it afterward with ls.
A common early mistake is trying to create a deep path at once when the parent folders don't exist yet, hitting a "No such file or directory" error. In that case, use the -p option.
In real work, this comes up constantly when setting up a project skeleton, or preparing a folder to store logs — any time you're organizing directory structure.
🧑💻 You can type this command into the Linux pseudo terminal to try it yourself (this page itself has no interactive terminal).
