Applications gone from Dock. How to restore? Somehow the Applications icon is gone from my Dock. However I can't just drag the Applications folder (from Finder) into the Dock. How else can I restore it?

Is there a config file somewhere for the Dock that I can just edit with vi and fix this?

Thanks.
Hmm, depending on how precisely you formulated the question there are several possible answers:


The Applications folder is missing from the Dock


Navigate to Computer in Finder (Shift-Command-C)
Open local hard drive (usually called "Macintosh HD" or computername)
Drag the Applications folder to the Dock (near the end where the other folders and the trash are located)
Right-click the folder in the Dock and select show as folder

The Applications folder/link is missing from the Favorites list in any Finder window


Step 1 and 2 as above
Drag the Applications folder to the Favorites list 

You are actually missing the Launchpad icon from the Dock


Step 1 and 2 as above
Open the Applications folder
Locate Launchpad and drag it to the Dock (near the beginning this time)