Unit 2 · Basic Commands · Lesson 13 of 34
Touché, m'kay dear?
touch and mkdir
Now that you know how to traverse the filesystem and view file contents, it's only logical to show you how to add your own files and directories to it. The two commands used for this are touch and mkdir.
To start, touch is used to create files. Simply typing touch followed by the desired file name creates a file with that name (be sure to encase the name in quotes if it includes spaces).
mkdir (short for "make directory") is just as simple. Typing mkdir followed by a desired name creates a new directory with that name.
Live Linux terminal
This lesson comes with a real Ubuntu machine that runs in your browser, so you type every command yourself. Create a free account to do this part.
Do this lesson for real
With a free account you get the terminal, the challenges and the checks that go with every lesson in Intro to Linux, and your progress is saved as you go. CyberAcad is a 501(c)(3) nonprofit, so there is nothing to pay.