HowTo: Mount Remote Windows Partition (Share) under Linux

The article describes how to mount CIFS shares manually. The shares can be on a Windows computer or on a Linux/UNIX server running Samba.


1. Install cifs-utils, if it hasn’t been installed yet.

This package contains tools for mounting shares on Linux using the SMB/CIFS protocol.

# yum install cifs-utils
# sudo apt-get install cifs-utils

2. Check that NetBIOS service is running and reachable on the remote host.

Port 139 TCP – NetBIOS (Windows File and Printer Sharing).
It allows applications on separate computers to communicate over a local area network.

You can test it with telnet or nmap.

# nmap -p T:139
Nmap scan report for
Host is up (0.0011s latency).
139/tcp open  netbios-ssn
MAC Address: 00:00:00:00:00:00 (Unknown)

# telnet 139
Connected to
Escape character is '^]'.

Mounting Remote Windows Share

Run all commands as root (use sudo).

Create mount point

# mkdir -p /mnt/win

Mount password protected network folder

# mount -t cifs //IP/SHARE /mnt/win/ -o dom=DOMAIN,user=USER,pass=PASS
# mount -t cifs // /mnt/win/ -o user=admin,pass=secret

You can use Computer/Server Name instead of IP Address.

  • ‘mount -t cifs’ – mount using the Common Internet File System (CIFS);
  • ‘-o’ – options passed to mount command;
  • ‘user=’ – username;
  • ‘pass=’ – password;
  • ‘dom=’ – domain e.g WORKGROUP (if server in domain).

Mount unprotected (guest) network folder

# mount -t cifs //IP/SAHRE /mnt/win/ -o guest
# mount -t cifs // /mnt/win/ -o guest
  • ‘guest’ – don’t prompt for a password.

Mount entire drive

# mount -t cifs //IP/DRIVE$ /mnt/win/ -o dom=DOMAIN,user=USER,pass=PASS
# mount -t cifs //$ /mnt/win/ -o user=admin,pass=secret

Unmount share

# umount /mnt/win/

2 Replies to “HowTo: Mount Remote Windows Partition (Share) under Linux”

  1. А если мне надо монтировать скриптом, то как поступить с паролем, он же будет лежать в открытом доступе

  2. Красавелла!!!!
    Столько вариантов попробовал, твой с первого раза победил!

Leave a Reply