9.3. Connecting to a Samba Share
Double-click one of the workgroup icons to view a list of computers within the workgroup.
To query the network for Samba servers, use the findsmb
command. For each server found, it displays its IP address, NetBIOS name, workgroup name, operating system, and SMB server version.
To connect to a Samba share from a shell prompt, type the following command:
smbclient //<hostname>
/<sharename>
-U <username>
Replace <hostname>
with the hostname or IP address of the Samba server you want to connect to, <sharename>
with the name of the shared directory you want to browse, and <username>
with the Samba username for the system. Enter the correct password or press Enter if no password is required for the user.
If you see the smb:\>
prompt, you have successfully logged in. Once you are logged in, type help
for a list of commands. If you wish to browse the contents of your home directory, replace sharename
with your username. If the -U
switch is not used, the username of the current user is passed to the Samba server.
To exit smbclient
, type exit
at the smb:\>
prompt.