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.
- Email this to a friend
- Printable version
- Rss Feed
- Last Updated: Aug/3/2007

{ 18 comments… read them below or add one }
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
i did a \\\ and din work (nothing happened, it just stucked)
added –verbose and saw some external ip it’s trying to connect to.
in the end, i did \\192.168.0.164\ and it worked cheerfully….
Awesome, it worked great from my Virtual PC installation of Suse Linux 10.2. Thank you very much.
Hi all,
I have tried the above approach, but it didn’t work. I tried the following approach and it worked
Step 1:
# mkdir -p /mnt/ntserverStep 2: Check what the Windows server is providing with smbclient
# smbclient –L -W -UEg.
# smbclient -L muralidhar12 -W windom -U murali
password:
If the command executes succesfully you will see the name of the shared folder of Windows
Step 3: Mounting the Windows Shared folder
# mount -t cifs : -ousername=,domain=Eg.
# mount -t cifs CORESERVER:F\$ /mnt/temp -ousername=nimda,domain=WINLAB
Password:
If all the steps carried out well, then you will be able to access the share folder.
Step 4: Now every time you restart the system, you have to carry out the Step 3. If you wish you can mount the share folder at startup too. To do this, add the following entry to your /etc/fstab file
MachineName:ShareFolderName /mnt/MountFolderName cifs username=UserName,domain=DomainName,password=Password 0 0
Eg.
TomsComputer:MyShare /mnt/winshare cifs username=tom,domain=work,password=secret 0 0
I have tried for above apporch.But it didn’t work on my pc.Why because i want mount remote windows(win XP OS) partion ntfs in my local linux(fedora 6.0)pc.Please help me.
My official mail id is resudoss@velankani.com
Personal id is raajaacbe@gmail.com
Thanks for you tip. it worked like a charm on clarkconnect community edition.
keep up the good work! and keep posting
This may useful when any one Got this error like
mount -t cifs //hostname/share /mnt/temp -o username=someuser,password=somepassword
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
Do like this:
=========
mount -t cifs //amit99.indusa1234.com/abc /mnt/ntserver -o username=indusa1234.com/amitgandhi,password=”tost123490″
This will work… Enjoy
thanks amitgandhi ,
my problem was not putting the password in double quotes; wasted hours figuring this out, shees linux needs some decent docs.
it is very useful to sloved the problems.thanks for all
Dear All,
Please help how to share Windows 2003 Folder and files to a OPENsuse linux11. What is th ecommand. and how to apply. Please help me out.
Thanks to all…
I like the way your censored your password… the first time you referred to it…