How to access a shared drive from the command prompt on OS X
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Ominous Technology Looping
--
Chapters
00:00 How To Access A Shared Drive From The Command Prompt On Os X
00:20 Accepted Answer Score 22
01:27 Answer 2 Score 0
01:46 Thank you
--
Full question
https://superuser.com/questions/395166/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#macos #shell #networkshares #finder
#avk47
ACCEPTED ANSWER
Score 22
If a network share is already mounted in the Finder, it will be accessible through /Volumes
in a shell, e.g. if your share is called "music", you'll find it under:
/Volumes/music
If you still need to mount it, you can actually mount it wherever you like — ideally not to /Volumes
, but for example on your desktop. You can use mount_smbfs
to do so. The complete syntax would be like this:
mount_smbfs //[domain;][user[:password]@]server[/share] ~/Desktop/music
In your case, if you have no special login and just guest
credentials, maybe the following is enough – when prompted for a password, you can just press Enter and skip it:
mkdir -p ~/Desktop/music
mount_smbfs //host/music ~/Desktop/music
… and voilà:
If you have a user and password, you could use //user@host/music
, and then enter the password interactively.
To safely unmount it, just call the following:
umount ~/Desktop/music/
ANSWER 2
Score 0
I have to test this on my Mac, but this article explains using the smbclient to execute what you need.
Take a look over here.
In a nutshell:
$ smbclient -U user -I 192.168.0.105 -L //smbshare/