Creating and removing directories

We can create directories by using another popular command. The mkdir command can be used to create a directory. Let's do a listing, using the ls command, as follows:

[philip@localhost ~]$ lsDesktop Documents Downloads Music Pictures Public Templates Videos[philip@localhost ~]$

 Now, let's create our own directory inside of /home/philip:

[philip@localhost ~]$ mkdir NewTest[philip@localhost ~]$ lltotal 36drwxr-xr-x. 2 philip philip 4096 Jul 31 14:59 Desktopdrwxr-xr-x. 2 philip philip 4096 Jul 31 14:59 Documentsdrwxr-xr-x. 2 philip philip 4096 Jul 31 14:59 Downloadsdrwxr-xr-x. 2 philip philip 4096 Jul 31 14:59 Musicdrwxr-xr-x. 2 philip philip 4096 Jul 31 14:59 Picturesdrwxr-xr-x. 2 philip philip 4096 Jul 31 ...

Get CompTIA Linux+ Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.