A single directory can be created using the
mkdir command on the command line. For example:
This would create the directory
private in the current directory.
Your exercise asks for a series of commands that creates the show directory structure, so this would be a series of
There are basically two ways you could solve this assignment:
Move to your home directory (with
cd), and then create each directory that is needed there. Then
cd into one of them and create each directory that is needed there etc., or
Move to you home directory, then use
mkdir -p with the paths of the bottom-most directories only. The
-p option to the
mkdir command would create the directory at the end of the specified path, but would also create any intermediate directories if they are missing. For example:
mkdir -p private/homework private/lab
would create both the
private directory and the
lab subdirectories beneath it.
See also the output of
man mkdir on you system.