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 folder2This 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