-3

I have been trying to access a folder to install a program and I keep receiving the following error message:

bash: cd: *: No such file or directory

I then tried accessing the desktop with the command cd desktop and received the following message:

bash: cd: desktop: No such file or directory

I've tried re-installing Terminal to see if that fixes the problem but still get the same messages.

Can anyone help with this issue? Accessing files and folders works normally through the Unity user interface.

EDIT: Solution found in comments and is not part of existing command-line questions.

Berrik
  • 325
  • 2
  • 9
  • 21
  • 1
    Try `cd ~/Desktop` – pomsky Oct 05 '17 at 17:22
  • That worked pomsky, thanks! Is there any reason why cd desktop didn't work? – Berrik Oct 05 '17 at 17:24
  • You should learn about `cd` and your file structure first, try the link above provided by Mark Kirby. – pomsky Oct 05 '17 at 17:26
  • Thank you! I'm semi familiar with terminal but as you can probably tell, I'm very new to using it. Thanks again for all your help! – Berrik Oct 05 '17 at 17:30
  • If you type `pwd` and the output is not `/home/` folder, then `cd Desktop` will not work. – Redbob Oct 05 '17 at 17:33
  • `cd desktop` is not the same as `cd Desktop` note difference between CAP D and lower case d – Panther Oct 05 '17 at 17:34
  • 2
    Thank you guys. I just tried `cd Desktop` again and it worked this time! `pwd` also brought up `/home/`. Learned some stuff today. The program installed correctly too! So all smooth running it seems! – Berrik Oct 05 '17 at 17:39
  • 1
    This is not the same question as [cd.. and cd- commands not found - how do I use the cd command?](https://askubuntu.com/q/179681) at all, nor does anything there actually answer this, so I am voting to reopen. At least as far as the second error message goes (`bash: cd: desktop: No such file or directory`), this is a duplicate of [How do I change the current working directory to the Downloads directory?](https://askubuntu.com/q/262674) or [Terminal doesn't go to /home/username/downloads](https://askubuntu.com/q/612287). The first error suggests `cd \*` was run, or `cd *` in an empty directory. – Eliah Kagan Oct 12 '17 at 08:18

1 Answers1

8

Obviously, you're not paying attention to the cases when dealing with folder names in Linux. Linux is case sensitive, so you must enter the names with letters in the correct case.

You probably have these default directories in your home directory (it will vary depending on your locale:

Documents, Desktop, Downloads, Music, Pictures, Videos

These start with a capital letter and can only be entered using cd followed by the exact, case sensitive name, or an appropriate wildcard. You are free to name other custom folders (created by you) as you desire, but note you will need to remember their letter case to be able to access them.

Example: George and george are two different folders and may be found in the same parent directory, so always pay attention to the letter case when dealing with folders and files on Linux.

Another important thing to note is the fact that your home directory is structured thus:

/home/<your_username>/...

and that /home/<your_username> is the same as the ~ character so these are the same:

cd ~/ <==> cd /home/<your_username>/
cd ~  <==> cd /home/<your_username>

Doing cd ~ will take you to your home folder, and Linux has another shortcut cd that when used will take you there also. Feel free to read up, and have fun. Welcome to the Linux World.

Zanna
  • 69,223
  • 56
  • 216
  • 327
George Udosen
  • 35,970
  • 13
  • 99
  • 121
  • Hi George, thank you for your in depth answer. I didn't even notice the lowercase "d" when I typed out my command. Panther already spotted this issue in the comment string. Not too sure why it was flagged as a duplicate post, as no one seems to have had this issue (no focus on case sensitivity). Thanks again though for additional information! – Berrik Oct 26 '17 at 01:19