3.1 pwd ls mkdir

Open Termux or WSL and try these commands.

pwd is used to show the current working directory. We are in our home directory. On WSL we will see /home/grantm

ls lists the contents of the directory. This directory is empty as we have just opened Termux.

mkdir creates a directory and this command creates directories. You can create one directory or many, separating each directory mname with a space.

ls lists the contents of the directory. Ths shows the two directories in a blue colour.

cd is to change directories. This command puts us down a level in the folder1 directory. We can check where we are by using pwd.

cd .. takes us up a level. After tihs command we have gone from /home/folder1 back to the /home folder.

cd folder1 returns us to /home/folder1. If we want to get to folder2 we can traverse the file tree.
cd ..
 cd folder2
This is moving using relative references, fine here but a pain if you are deep in the file structure.

Instead by using the command
cd ~/folder2 will take us straight there. The ~  after the cd means change to the home directory.


No comments:

Post a Comment

Introduction to Linux Command Line

SSH is the way you will connect to your Linux server. You will need to understand the basics of the Linux Command Line.