LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-22-2012, 06:37 AM   #1
Bharat Jarwal
LQ Newbie
 
Registered: Feb 2012
Distribution: Red Hat Linux
Posts: 2

Rep: Reputation: Disabled
command for mount


Hi

I want to mount windows share directory in Linux, which command should i use
any one pls help me
 
Old 02-26-2012, 06:14 PM   #2
WSmart
Member
 
Registered: Oct 2009
Posts: 32

Rep: Reputation: 0
Greetings,

You have to install Samba. If you have trouble setting Linux up as a client, you can also try it the other way, setting Linux up as the server.

If you can't get it work you could post your Linux distribution and you might find someone here with more information.

Thanks for posting and thanks all.

Be real, be sober.

Last edited by WSmart; 02-26-2012 at 06:15 PM. Reason: grammar
 
Old 02-26-2012, 06:38 PM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Generally speaking, Samba is the answer to most Windows-Linux file sharing questions.

Though, the full-blown samba package may not be necessary. If all you need to do is connect to an existing Windows share, you only need the smbmount command. If you are using a Debian-based distribution, you can get smbmount through your package manager by installing the smbfs package.

If you like using the command line:
Code:
apt-get install smbfs
You will need to be root when you execute that command. If you are using an Ubuntu distribution, you usually just need to put "sudo" at the front of it.

Once installed, you mount the Windows share into your Linux filesystem just as you would any other drive. So, create a directory to serve as a mount point, and (as root) issue the following command:
Code:
smbmount //servicename/sharename mount_point
Replace servicename with the name or IP address of the computer providing the share.

Replace sharename with the name of the share you want to access.

Replace mount_point with the directory you created earlier.

If the command is successful, you will see no error messages (or output of any kind), but listing the contents of mount_point should show all the directories/files provided in the share.

If you get an error when trying the command with a computer name for servicename, try the command again with an IP address. There may be an issue with Linux communicating with the WINS server on your network to translate the name to an IP.

Lastly, if you want to provide your Windows machines with access to your Linux machine's files, you will need to setup the full-blown samba package to do so.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mount Iomega external hard drive on debian squeeze, how to use mount command Foxbat1155 Linux - Hardware 15 02-21-2012 05:55 PM
How to allow any user to mount disks with the mount command Windows to Linux Linux - Software 6 11-29-2010 07:21 PM
I'm working with symlinks with mount command to mount remote shares lhorace Linux - Newbie 1 11-21-2009 05:05 PM
Execute command on mount and integrate with gnome-mount / umount Peter Rhone Linux - Newbie 4 11-18-2008 06:28 AM
command mount G_Slackw Linux - Software 6 06-21-2004 11:57 PM


All times are GMT -5. The time now is 08:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration