How to create Dock entries via Terminal in macOS Sierra? So I found a command that lets me create Dock entries via Terminal. This was working fine on OS X El Capitan, but not with macOS Sierra.

Any ideas how this can be done with macOS Sierra?

This is sample command that works with OS X El Capitan:

defaults write com.apple.dock persistent-apps -array-add "&lt;dict&gt;&lt;key&gt;tile-data&lt;/key&gt;&lt;dict&gt;&lt;key&gt;file-data&lt;/key&gt;&lt;dict&gt;&lt;key&gt;_CFURLString&lt;/key&gt;&lt;string&gt;/Applications/VLC.app&lt;/string&gt;&lt;key&gt;_CFURLStringType&lt;/key&gt;&lt;integer&gt;0&lt;/integer&gt;&lt;/dict&gt;&lt;/dict&gt;&lt;/dict&gt;"
As a test in macOS Sierra, I just downloaded the vlc-2.2.4.dmg file and installed VLC to /Applications via drag and drop to the Applications alias within the installer window.

In Terminal, I ran the following command:

defaults write com.apple.dock persistent-apps -array-add "&lt;dict&gt;&lt;key&gt;tile-data&lt;/key&gt;&lt;dict&gt;&lt;key&gt;file-data&lt;/key&gt;&lt;dict&gt;&lt;key&gt;_CFURLString&lt;/key&gt;&lt;string&gt;/Applications/VLC.app&lt;/string&gt;&lt;key&gt;_CFURLStringType&lt;/key&gt;&lt;integer&gt;0&lt;/integer&gt;&lt;/dict&gt;&lt;/dict&gt;&lt;/dict&gt;"; killall Dock


Note that I added ; killall Dock directly after the command line from your question.

As the Dock reappeared, the VLC Dock Tile was present and I then click it. VLC opened as expected.