Linux Access Windows shared folders (GO)

Source: Internet
Author: User

In the development of Linux programs, you will often use the Windows editor for editing, so also to copy to the Linux server, if you have this development habits of students, you can use this way to develop.

Of course, in addition to this method, you can install NFS server, but my 64-bit Win7 system, a lot of NFS server is not supported, so you can only use this way of sharing folders.

Windows side:

1: Create a shared folder under Windows.

2: Make sure that the Windows user has a password set.

Linux side:

1: Install Cifs-utils package, after installation, the system appears mount.cifs command. Alternatively, the mount in the release package supports the-T CIFS parameter.

2:mount.cifs-o username= "Shared user", password= " password "//ip/sharing_folder/mountpoint

Issue 1: When you share a virtual machine file, the following error occurs at compile time:

Arm-none-linux-gnueabi-gcc-lpthread-o Beep beep.c BEEPLIB.C
Cc1:error:beep.c:value too large for defined data type
Cc1:error:beeplib.c:value too large for defined data type
Make: * * * [beep] Error 1

Correction method: sudo mount-t cifs-o Username=wx,passwd=wx,nounix,noserverino//192.168.1.108/vm_share/mnt/share

Added, Nounix,noserverino

Question 2:unable to Umount, device is busy

If you get this error message and the ' Umount ' as well as ' umount-f ' commands don ' t work, try a "lazy" umount:
Umount-l/mnt/badmount
Then mount the share again, as shown below:
Mount-t CIFS//hostname/goodmount/mnt/goodmount-o username=,password=
Note-using the "CIFS" keyword instead of the SMBFS keyword after-t would result in fewer problems like this.

Question 3:mount error = Cannot allocate memory
When mapping files under Windows with the MOUNT.CIFS command, this error occurs when the file is too large, and the workaround is:
Modify Registry Hkey_local_machine\system\currentcontrolset\services\lanmanserver\parameters\irpstacksize key value is greater than or equal to 15, If the IRPStackSize item does not exist, create a new DWORD value, click on the pop-up window of the decimal, the value of write a 18 OK, but also to restart a bit.

Http://blog.chinaunix.net/uid-20682890-id-3526098.html

Linux Access Windows shared folders (GO)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.