Network

The smbclient command

Samba client: lists shares (-L) or connects to a shared folder.

Syntax

smbclient -L <host>Try it in the terminal →

Most useful options

-LList the host shares

Copy-ready examples

$ sudo systemctl start smbdStart Samba
$ smbclient -L localhostSee the shares

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • If smbd is not active it gives NT_STATUS_CONNECTION_REFUSED.

Related commands

FAQ

What is smbclient for?

It is a client to connect to SMB/CIFS shares, similar to FTP.

How do I list the shares?

With smbclient -L //server.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course