SMB share via terminal

Discussion in 'macOS' started by Maccle, Oct 16, 2011.

  1. Maccle macrumors newbie

    Joined:
    Sep 13, 2011
    #1
    Hey,
    I've searched around but couldn't find what I need. I have a share on my PC and want to access it from my MBP. When I use 'Connect to server' from Finder, it works fine. What I want to do is to be able to browse the share via the terminal as if it was any other directory. Is there a way to use the terminal to browse the SMB share instead of using Finder? Thanks!
     
  2. Madd the Sane macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #2
    Wirelessly posted (Mozilla/5.0 (iPod; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5)

    Open the Terminal and drag the mounted share. Make sure you type "cd " first.
     
  3. Maccle thread starter macrumors newbie

    Joined:
    Sep 13, 2011
    #3
    Awesome, had no idea you could do that. I tried creating an alias folder and accessing that from terminal but it wouldn't work. Is there a way to connect the two processes together so that I don't have to use Finder to drag from? Thanks!
     
  4. Madd the Sane macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #4
    Mounted file systems (which is what SMB is) will be in /Volumes. Just search for your mounted SMB name.
     
  5. ScoobyMcDoo macrumors 65816

    Joined:
    Nov 26, 2007
    Location:
    Austin, TX
    #5
    I think the OP was asking how to do the mount from the command line rather than how to access the volume once mounted.

    You can use mount_smbfs to mount a volume, or if you simply want to do some file transfers, you can do that without mounting the file system with the smbclient program which acts much like FTP.
     
  6. Maccle thread starter macrumors newbie

    Joined:
    Sep 13, 2011
    #6
    Thanks ScoobyMcDoo, that's the command I needed for the mounting. :)
     

Share This Page