nixCraft Poll

Topics

How to mount remote windows partition (windows share) under Linux

Posted by Vivek Gite [Last updated: August 3, 2007]

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,

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:

Discussion on This Article:

  1. D'Angelo Says:

    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?

  2. nixcraft Says:

    D’Angelo,

    Is it a dual boot system or networked system?

  3. Nandkishor Says:

    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

  4. nadav Says:

    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

  5. michael Says:

    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.

  6. martin Says:

    Hi,

    i have exactly the same issue michael…
    Does anyone know, what the problem is?

    thanks a lot,

    martin

  7. vivek Says:

    michael / martin,

    Use cifs option instead of smbfs (outdated and not supported).

    HTH

  8. franco Says:

    Martin, Michael, you must have smbfs installed to run cifs, so

    $sudo aptitude install smbfs

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!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , ,

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.