Contents
How do I create a subdirectory in Linux?
To create a new directory with multiple subdirectories you only need to type the following command at the prompt and press Enter (obviously, change the directory names to what you want).
The -p flag tells the mkdir command to create the main directory first if it doesn’t already exist (htg, in our case).
What is a subdirectory in Linux?
A subdirectory is a directory that is located within another directory. A similar term can be used to describe a folder beneath another folder in a GUI (graphical user interface) like Microsoft Windows.