简体   繁体   中英

cd Desktop gives an error no such file/ directory in terminal

In Terminal, on mac, when i use the cd Desktop to view files through the terminal i get an error "no such file or directory" When i checked the current working directory, it shows I'm in /home/ I do not understand why suddenly it doesn't work. I tried using a .profile file to have some alias and path change. Could this change in .profile file cause this error?

Try use cd (with no parameters) for jump to your home directory which should be /Users/username. Then use cd Desktop. Alternatively you can do "cd ~/Desktop"

First of all, make a desktop folder in the home folder, then open the command prompt

Also, try the " cd desktop " command you will not get an error. Always remember the case-sensitive words before running Command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM