Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I connect my MacBook to a WindowsXP in the Terminal?

Hello,

at present I get this done by:

Finder, cmd+K, <choose Server Address>, [Connect], connect as Guest, [Connect], (shows sharename), [OK]

[ ] is a button clicked.


I would like to do the same in a bash commandline.

Thanks.

;JOOP!

MacBook Pro with Retina display, OS X Mountain Lion (10.8.5)

Posted on Nov 8, 2013 10:30 AM

Reply
Question marked as Best reply

Posted on Nov 10, 2013 1:52 AM

If I understand your question correctly, you want to mount a network share from a Windows file server at the command line? The following article should probably help:


http://osxdaily.com/2009/09/24/access-and-mount-an-smb-share-via-command-line/


Hope this helps. I don't have access to any Windows systems here so I can't really test this out and check that it is still all valid for Mountain Lion.


Ivan

4 replies
Question marked as Best reply

Nov 10, 2013 1:52 AM in response to Sciuriware

If I understand your question correctly, you want to mount a network share from a Windows file server at the command line? The following article should probably help:


http://osxdaily.com/2009/09/24/access-and-mount-an-smb-share-via-command-line/


Hope this helps. I don't have access to any Windows systems here so I can't really test this out and check that it is still all valid for Mountain Lion.


Ivan

Nov 11, 2013 9:09 AM in response to ivansky

Hi, indeed that URL and some others helped me.

The reason I want to work from the commandline is that I program in JAVA.

To overcome the language limitations I spawn bash commands or (directly) unix-commands from JAVA.


For some reason I failed to spawn this command:


/bin/bash -c /bin/mkdir /Volumes/XpShare; /sbin/mount_smbfs //guest@XPsystem/XpShare /Volumes/XpShare


so, for the time being I put it in a file and invoke "/bin/bash myScript.sh"


that works.


Btw, is this also THE way to connect to another Mac? (I ordered one) or should I use another protocol between Mac's?

;JOOP!

Nov 12, 2013 1:43 AM in response to Sciuriware

I'm not really an expert on your second question, but I think the answer is "it depends". If you want to mount a share from another mac, I think it will depend on how you have exported the share. If you look in "Sharing" under "System Preferences" and then click "Options" you can choose whether you want to use SMB or AFP.


The following two articles may tell you more than you ever wanted to know about file sharing on OS X:


http://support.apple.com/kb/HT5884


http://support.apple.com/kb/HT4538


Hope that helps or someone else may chime in with more detail. Otherwise, give it a try when you get your second mac and start another thread if you are having problems.


Ivan

How can I connect my MacBook to a WindowsXP in the Terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.