When it comes to changing to a different directory inside Linux, this can simply be done by using the simple # CD and # ls commands.
I wanted to show this command of Linux, it's a very simple command and works great when it comes to directories and changing between directories.
This is the Linux command to check which folder you are in, simply type # ls
# ls
As you can see on the screen I can see my home directory, if you are not home use the # cd / command to return to your home location if you need to.
Then you will simply go inside your test folder and make 2 folders within our test folder.
To do this you will simply type in # cd testfolder which will move you out from our current working position and inside the test folder.
To check that you are inside this testfolder which should be empty, you can test by using command # ls again, which should show empty feedback.
When there is nothing shown on my screen, I know that this folder is now empty.
Then I will create my 2 new folders inside this testfolder which will be located at root/testfolder/"my new folders"
At this time we will create a test1 and test2 inside "testfolder" To do this you guys will type in the code shown below;
# mkdir test1
Then simply hit enter and type in again "# mkdir test2"
# mkdir test2
Now you guys should have made 2 subfolders in your main folder named "testfolder", this is "test1" and "test2"
Finally, let's check this by using the GUI file/folder feature, which should be located in your server.
Alternatively, you guys can also view-check this by using the commands. Check below;
- Type in # cd / to go to the main home directory
- Then use # cd testfolder to move inside the testfolder
- Then to read files or folder inside the test folder type # dir
- You will now see 2 folders came back which we made "test1" and "test2"
Altogether, I hope you guys have learned something from this tutorial.
Hey guys, this is a very simple Linux tutorial, please leave a comment if you have any questions, thanks.