Main.AccessingSAMBAOrWindowsShares


Options available for command-line access to Windows or Samba network shares:

Listing shared folders

Discovering the available SMB shared folders in the terminal:

smbclient –L IDADDRESS –U USERNAME

where IPADDRESS and USERNAME are filled in by you. You may be asked for a password.

The –L option triggers a listing operation

Examples:

  smbclient //192.168.0.99/sharedir –U username

other formats are allowed for the ip address:

 smbclient –L 192.168.0.99 –U username 

Mounting SMB shares onto a local directory

This uses the smbmount command:

  smbmount //IPADDRESS/sharedir /mountpoint –o username=USERNAME,workgroup=WORKGROUP

Where IPADDRESS, sharedir, mountpoint, USERNAME and WORKGROUP are filled in by you.

Example:

  mkdir /mnt/coolshare/
  smbmount //192.168.0.200/coolshare /mnt/coolshare –o username=john,workgroup=wg