How Do You Exit a Directory in Linux?

How Do You Exit a Directory in Linux?
Contents

How do I exit one directory in Linux?

File & Directory Commands

  1. To navigate into the root directory, use “cd /”
  2. To navigate to your home directory, use “cd” or “cd ~”
  3. To navigate up one directory level, use “cd ..”
  4. To navigate to the previous directory (or back), use “cd -“

How do you exit a directory in command prompt?

You can not get “out” of a folder. Well, you can, but only by changing to a different directory. In the terminal, you always have a current working directory. The cd command changes this working directory to the specified one.

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.