Skip to content
Advertisement

How do you add a new directory in Linux? [closed]

I am currently taking a Computing GCSE, and I have got a Linux Controlled Assessment, and this is one of the tasks:

Create a directory within your home directory. Name it A452. Navigate to your new A452 directory. Type touch mynametextfile, where myname is your first name.

I tried adding a new folder called A452, and then opening the terminal and typing touch matthewtextfile, but that didn’t work. I am very new to Linux, and I tried Wikipedia, so what should I do?

Edit: It turns out that it was in my Home folder, not my newly created one!

Advertisement

Answer

try this in your terminal:

$ cd ~               # move to your home directory
$ mkdir A452         # create directory named A452
$ cd A452            # mv to that directory
$ touch mynametextfile  # create file "mynametextfile"
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement