2

In the ubuntu terminal I am trying to change from the current directory to a new directory that i just previously made. When I go cd /(name of the directory/ it tells me that no such file or discovery exists when it clearly does. (I have went inside the file and when I type mkdir command it says that it cannot make the file again because it already exists.My goal is to change to the new directory in the terminal and then hit pwd to make sure that i am in there. I then want to enter a command to open up microsoft visual code (which I have done), create some notes and save them, to link the directory to a microsoft visual code, then check the contents of the new directory to make sure that the microsoft visual code notes are in there. However, this is not working. I am using ubuntu wsl (I have microsoft 10 and I just recently downloaded ubuntu). So please help.

  1. how do I change the directory in the terminal to make sure that I am in the directory that I want to be in ( cd /(name of terminal)/ ) is not working
  2. how do I make sure that once i create the microsoft visual notes that I can check that it is inside the new directory's contents?

Thank you

2
4

There is a difference between the relative path and the absolute path.

An absolute path starts with the root file system at /.

A relative path is the path that is relative to your current directory.

If you type the path beginning with a /, then you are indicating the absolute path.

If you type the path without the / at the beginning, then you are indicating a relative path.


For example, let's assume that you are currently in your /home/user/ folder:

If you type cd Downloads, you will change to /home/user/Downloads.

If you type cd /Downloads you will get the error "No such file or directory" because /Downloads does not exist under your root file system.

1
  • thank you what you said worked...much appreciation – westna Feb 28 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.