To change the current directory in Linux, you use the cd command, which stands for "change directory."
Although we haven't reached the specific step for navigation yet, here is how you can use it:
- To move into a specific folder: Type
cdfollowed by the folder name.cd folder_name - To go back to the parent folder (one level up): Type
cdfollowed by two dots.cd .. - To return to your home directory: Simply type
cdby itself and press Enter.cd
Try it out:
Since you are currently in /home/labex/project, you can try typing cd .. in your terminal. You will notice the prompt change to show you are now in the /home/labex directory!
You will learn more about this in the upcoming steps of the lab. Keep going!