Mount Windows shared directory under Linux system

Source: Internet
Author: User

At work sometimes we need to mount the Windows shared directory on Linux. First we need to learn to view Windows on Linux to share those directories. The view operation requires the installation of samba-client.

[Email protected]5201351yuminstall samba-client-y   // Installing the Samba client

After installing Samba-client, the next step is to look at the shared resources on the Windows host and see the following commands:

[Email protected]5201351192.168. 100.1 -u Administrator    //  displays a list of all resources shared by the server,-U is the specified user name

The author's test results are as shown, where Share-test is a directory shared on my Windows host:

The above command is only the query server shared those resources, we also need to consider how to attach resources to the local, easy to add and delete changes, we can use the following command to mount.

[Email protected]5201351Mount -t cifs-o username=administrator,password=123456//  192.168.100.1/share-test/mnt/windows

Where cifs is the mount type, CIFS is the abbreviation for the Common internet file system, and the Universal Internet filesystem

Network file sharing between Windows hosts is achieved by using Microsoft's own CIFS service .

in the command above //192.168.100.1/share-test is a shared directory on the Windows Server side.

The contents of the Share-test directory shared on Windows are also mounted to the/mnt/windows directory under Linux.

This command mounts the shared directory after the restart will expire, if you want to take effect every time, you can add the following at the end of the /etc/fstab file:

// 192.168.100.1/share-test/mnt/windows   cifs   defaults,username=administrator,password=123456   0 0

Mount Windows shared directory under Linux system

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.