From the course: LPIC-1 Exam 101 (Version 5.0) Cert Prep

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create files and dirs

Create files and dirs - Linux Tutorial

From the course: LPIC-1 Exam 101 (Version 5.0) Cert Prep

Start my 1-month free trial

Create files and dirs

- [Instructor] We can use applications like text editors such as Vim or Gedit to create files just the same as we would in other operating systems. I'll use Vim for this exercise. In a terminal, type in vim ~/textfile.txt and hit Enter. And now we're in Vim and we can add text by pressing the insert key and typing. You'll notice that the bottom line says insert. This lets you know that you're in insert mode. Go ahead and type in some text. When you're done, press Escape + :wq and hit Enter. If you'd like to get a quick overview of how to use Vim, check out my course in the library titled "Linux Directory Structure and Basic Tools." Now let's verify that we have a file by typing in ls -l ~ and hitting Enter. We can see that we have a text file .txt in the list. In both cases, I use the tilde as a shortcut to my home directory. Using Vim to create ~/textfile.txt creates a file called textfile.txt in my home directory.…

Contents