How to mount remote windows partition (windows share) under Linux
All files accessible in a Linux (and UNIX) system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree.
Use the mount command to mount remote windows partition or windows share under Linux as follows:
Procedure to mount remote windows partition (NAS share)
1) Make sure you have following information:
==> Windows username and password to access share name
==> Sharename (such as //server/share) or IP address
==> root level access on Linux
2) Login to Linux as a root user (or use su command)
3) Create the required mount point:
# mkdir -p /mnt/ntserver
4) Use the mount command as follows:
# mount -t cifs //ntserver/download -o username=vivek,password=myPassword /mnt/ntserver
Use following command if you are using Old version such as RHEL <=4 or Debian <= 3:
# mount -t smbfs -o username=vivek,password=D1W4x9sw //ntserver/download /mnt/ntserver
5) Access Windows 2003/2000/NT share using cd and ls command:
# cd /mnt/ntserver; ls -l
Where,
- -t smbfs : File system type to be mount (outdated, use cifs)
- -t cifs : File system type to be mount
- -o : are options passed to mount command, in this example I had passed two options. First argument is password (vivek) and second argument is password to connect remote windows box
- //ntserver/download : Windows 2000/NT share name
- /mnt/ntserver Linux mount point (to access share after mounting)
See also:
Updated for accuracy on Aug-8-2007, 8:19PM.
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Linux mount remote filesystems automatically at boot time
- Resize Windows Partition with Open Source Software
- Best Linux / UNIX Posts of 2007: Part ~ I
- How to add Windows TrueType fonts easily in Linux desktop system
- Tip of the day: Automount your Linux samba host into a Windows environment
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: cifs, ls_command, mount_cifs, mount_command, mount_windows_share_on_linux, partition, server_share, share_name, unix_system



I Have two Operating System, Windows XP the other is Fedora how can I make them talk to each other, how can I make them file share?
D’Angelo,
Is it a dual boot system or networked system?
Hi,
I have used dual boot system, using Windows 2001 & Red Hat Linux.
1) How make them to speak or share etch other files.
2) How I login Linux & windows without restarting the computer. There is any utility for this.
Regards,
Nandkishor
using -t cifs : File system type to be mount
seams to work better is some cases
example:
mount -t cifs //server/share /mnt –verbose -o user=username
more info:
http://www.die.net/doc/linux/man/man8/mount.cifs.8.html
I tried this command on my Ubuntu system but got the following error:
mount: wrong fs type, bad option, bad superblock on //server_name/Ubuntu_Backups,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I also tried nfs but still no good. I have a windows server 2003 machine I am sharing to the ubuntu box.
Hi,
i have exactly the same issue michael…
Does anyone know, what the problem is?
thanks a lot,
martin
michael / martin,
Use cifs option instead of smbfs (outdated and not supported).
HTH
Martin, Michael, you must have smbfs installed to run cifs, so
$sudo aptitude install smbfs