Working With Samba



smbclient //$IP/$SHARE -U $USER -p $PORT

The -p directive is only necessary if working over a non-standard port (e.g., not 445).

If -U is not included, smbclient will use your current (local) username, so probably best to fill something else in. If a password needs to be sent, specify the user as ${USER}%${PASSWORD}.

The interface is reminiscent of old-school FTP clients.


smbget smb://$IP/$SHARE/$FILE -U $USER

Download $FILE from $SHARE at $IP.

Note that the semantics are annoyingly slightly different from smbclient - no port specification, and the smb: protocol portion of the URI must be included.

Use -R (and omit $FILE) to recursively download an entire directory.

net share

Use net share on Windows to list all current shares (including some that are just control processes).