NOTES: Linux access to Windows sharing

Source: Internet
Author: User

There are two ways to access Windows shares in Linux:

Method One: Mount Mount

Create a mount point:

[Email protected] mnt]# Mkdir/mnt/myshare

Mount:

[Email protected] mnt]# mount-t cifs-o Username=lee//192.168.8.1/share/mnt/myshare/

The specific meaning of several parameters:

Cifs:common Internet File System, #可以理解为网络文件系统. Usrname: #访问共享文件夹的用户名password: #访问密码 (I do not have a clear input here)//192.168.66.198/share: #表示网络文件夹的地址, note that there is no last addition/// 192.168.66.198/share/will report the following error: Mount://192.168.66.198/share/is not a valid block device

Automatic mount on Boot:

[Email protected] mnt]# vim/etc/fstab//192.168.8.1/share/mnt/myshare cifs defaults,username=lee,password=******* 0 2[[email protected] mnt]# mount-a

Method Two: Samba-client

Check to see if there are any sambaclient installed

[Email protected] myshare]# Rpm-qa | grep Samba

If not, install the Samba client:

[email protected] myshare]# Yum install samba-client

To view Windows shared folders:

[Email protected] myshare]# smbclient-u lee-l//192.168.8.1

To manipulate Windows shared folders:

[Email protected] myshare]# smbclient-u Lee//192.168.8.1/shareenter Lee ' s Password:domain=[dannylee] os=[windows En Terprise 10240] server=[windows Enterprise 6.3]smb: \> #表示进入sambaclient的内部命令: SMB: \> help #查看smb可用命令smb: \> h ELP get #查看具体命令使用方法HELP get:<remote name> [local name] Get a FILESMB: \>ls #查看共享文件夹中的文件

To download a file from a shared folder:

SMB: \> Get 3389.txt/lee/bak/test.txt

Upload a file to a shared folder:

SMB: \> put/lee/bak/test.txt test.txt

Other commands are slightly.


NOTES: Linux access to Windows sharing

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.