I administrate MacBooks (os version 10.13) most of the time remotely and as much as possible from terminal only.

I know how to display Hard drives in the sidebar of the Finder using the graphical interface > Finder > Preferences...

Is it possible to enable this from terminal? (sfltool is not available anymore since 10.13+)

  • 1
    I miss the days when the sidebar could be tweaked with plistBuddy. Depending on your OS version (I'm assuming 10.13), this might (or might not) be of help: jamf.com/jamf-nation/discussions/20218/the-slftool-thread. The file you want to change is: ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteVolumes.sfl2
    – sansSpoon
    Jul 4, 2018 at 9:38
  • Thanks, that indeed the file I want to change but since sfltool is not available any more, that's a bit tricky. I've found a solution in the comment Jul 4, 2018 at 10:47

1 Answer 1


Here's my solution based on the link shared by @sansSpoon:

You can use this python lib: FinderSidebarEditor

Simply put it in your python path then in python, you can edit your Finder Sidebar easily:


from FinderSidebarEditor import FinderSidebar                  # Import the module

sidebar = FinderSidebar()                                      # Create a Finder sidebar instance to act on.

sidebar.remove("All My Files")                                 # Remove 'All My Files' favorite from sidebar
sidebar.remove("iCloud")                                       # Remove 'iCloud' favorite from sidebar
sidebar.add("/Library")                                        # Add '/Library' favorite to sidebar
sidebar.add("/SomeShare", uri="smb://shares")                  # Mount 'smb://shares/SomeShare' to '/Volumes/SomeShare' and add as favorite to sidebar
sidebar.add("/SomeOtherShare", uri="afp://username:pw@server") # Mount pw protected 'afp://server/SomeOtherShare' to '/Volumes/SomeOtherShare' and add as favorite to sidebar
sidebar.move("Library", "Applications")                        # Move 'Library' favorite to slot just below 'Applications'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .