Search code examples
macosfilecommand-lineterminaldock

Add files to Dock on macOS using the command line


How can I add a file to the Dock in macOS using the Terminal?

Typically this is done using Finder, by dragging and dropping the file icon into the Dock. I am looking for a programmatic way using the command line / Terminal.


Solution

  • dockutil works flawlessly. Download the .pkg from their github Releases page.