How can you change the current directory?

QuestionsQuestions8 SkillsProDec, 18 2025
097

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:

  1. To move into a specific folder: Type cd followed by the folder name.
    cd folder_name
  2. To go back to the parent folder (one level up): Type cd followed by two dots.
    cd ..
  3. To return to your home directory: Simply type cd by 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!

0 Comments

no data
Be the first to share your comment!