How to use Terminal to navigate into a desktop shortcut or folder in applications?

23,339

In order to get to the Main Mac folder, you can do cd /

Share:
23,339
MKM
Author by

MKM

Updated on September 18, 2022

Comments

  • MKM
    MKM almost 2 years

    I'm on a Mac and watching a tutorial on setting up Git.

    I'm in the terminal and currently on the Desktop. I can us ls to list all the items on my desktop, and cd into any of the folders on my Desktop, but I can't get into my localhost shortcut (which leads to the MAMP folder in applications where all my websites are).

    Error message:

    enter image description here

    1) How do you navigate into a shortcut, or

    2) How do you navigate into the Main Mac folder (I can't see or cd into it from the terminal)

    • Ignacio Vazquez-Abrams
      Ignacio Vazquez-Abrams about 11 years
      file localhost says...?
    • MKM
      MKM about 11 years
      when I type that in, it displays 'data'
    • Ignacio Vazquez-Abrams
      Ignacio Vazquez-Abrams about 11 years
      I would remove the shortcut and create a symlink instead.
    • slhck
      slhck about 11 years
      If you want to keep the alias and follow that, see: OS X terminal command to resolve path of an alias
  • MKM
    MKM about 11 years
    Just tried that again, and can't CD into an alias :(
  • MKM
    MKM about 11 years
    Thanks! I can now cd into my Applications > MAMP folder :)
  • francesco
    francesco about 11 years
    Yeah, sorry, my answer was wrong, I revised it.