Skip to content

Instantly share code, notes, and snippets.

@diegoscl
Last active July 24, 2019 22:02
Show Gist options
  • Select an option

  • Save diegoscl/8346d2c8db6bae1551c4c350c2662db7 to your computer and use it in GitHub Desktop.

Select an option

Save diegoscl/8346d2c8db6bae1551c4c350c2662db7 to your computer and use it in GitHub Desktop.
[macOS] Mount a SMB share
#!/bin/bash
# Use applescript to auto-mount a SMB share in /Volumes and save password in Keychain.
# Source: https://apple.stackexchange.com/a/303595
osascript <<EOF
mount volume "smb://USER@SERVER/SHARE"
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment