• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

smbclient: command not found

by Deepika

smbclient is a command-line utility that provides an FTP-like interface for accessing SMB/CIFS resources on servers. SMB/CIFS (Server Message Block/Common Internet File System) is a network protocol used for sharing files, printers, and other resources between computers on a network.

smbclient allows you to browse and access shared folders and files on remote servers that use the SMB/CIFS protocol. It supports a wide range of features, such as browsing folders, uploading and downloading files, creating and deleting folders, and setting file permissions. It also supports authentication and encryption options to ensure secure communication with the server.

Using smbclient is similar to using an FTP client. You can connect to a remote server using the smbclient command followed by the server name or IP address, and then enter your username and password to authenticate. Once connected, you can use commands such as ls to list files, get to download files, and put to upload files.

smbclient is commonly used in network administration tasks, such as transferring files between Windows and Linux systems or backing up files from Windows servers. It can also be used in scripting and automation tasks to perform operations on remote SMB/CIFS resources.

If you encounter the below error while running the command smbclient:

smbclient: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install smbclient
Ubuntu apt-get install smbclient
Arch Linux pacman -S smbclient
Kali Linux apt-get install smbclient
CentOS yum install smbclient
Fedora dnf install smbclient
Raspbian apt-get install smbclient

smbclient Command Examples

1. Connect to a share (user will be prompted for password; `exit` to quit the session):

# smbclient //server/share

2. Connect with a different username:

# smbclient //server/share --user username

3. Connect with a different workgroup:

# smbclient //server/share --workgroup domain --user username

4. Connect with a username and password:

# smbclient //server/share --user username%password

5. Download a file from the server:

# smbclient //server/share --directory path/to/directory --command "get file.txt"

6. Upload a file to the server:

# smbclient //server/share --directory path/to/directory --command "put file.txt"

7. List the shares from a server anonymously:

# smbclient --list=server --no-pass

Summary

In summary, smbclient is a powerful utility for accessing and managing SMB/CIFS resources on remote servers. Its FTP-like interface and support for a wide range of features make it a popular choice for network administrators and other users who need to transfer files or perform operations on remote SMB/CIFS resources.

Filed Under: Linux

Some more articles you might also be interested in …

  1. steghide: command not found
  2. gradle: command not found
  3. sar: command not found
  4. slapt-get Command Examples in Linux
  5. passwd: command not found
  6. gnome-software: command not found
  7. How to find the inode size of an ext2/ext3/ext4 filesystem?
  8. How to Start, Stop, Restart, Check Status IIS Service by Command Line
  9. Basic nano Commands (Cheat Sheet)
  10. ncview: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright