Home>Article>Operation and Maintenance> How to realize file sharing between windows and Linux
1. Right-click "My Computer" —> Click Management
2. Enter the computer management interface:
Click System Tools —> Local Users and Groups -> Users -> Cancel the "Account is disabled" option
1. Right-click the directory that needs to be shared (this example file Name TEST), click Properties——> Sharing-Sharing
drop-down option and select Everyone——> Click Add——> Sharing
2. Then click Security——> Edit - Select Everyone user - Check all allowed permissions - Apply - OK - OK
1. Open the command box (win key R)——>Enter secpol. msc——>Select local policy——>User rights assignment——>Deny access to this computer from the network——>Delete Guest user
2. Security options——>Network access: Sharing and security model for local accounts——>Select: Guest only
3. Control Panel——>Programs——>Programs and Features——>Turn Windows features on or off——> Check the SMB 1.0/CIFS file sharing option and sub-options
The computer will be restarted after the settings are completed
Control Panel——> Windows Defender Firewall ——> Enable or turn off Windows Defender Firewall——> Select to turn off the firewall——> Click OK
Now the windows server configuration is completed
1. Check whether samba-client is installed
[root@localhost ~]# rpm -q samba-client samba-client-4.10.16-20.el7_9.x86_64 # 如果没有安装 [root@localhost ~]# yum -y install samba-client # smbclient -L //服务端ip (服务端ip也就是windows电脑ip) [root@localhost ~]# smbclient -L //192.168.88.57 # 回车之后提示输入密码,不需要输入直接回车 Enter SAMBA\root's password: Sharename Type Comment --------- ---- ------- ADMIN$ Disk 远程管理 C$ Disk 默认共享 D$ Disk 默认共享 E$ Disk 默认共享 IPC$ IPC 远程 IPC TEST Disk Reconnecting with SMB1 for workgroup listing. do_connect: Connection to 192.168.88.57 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND) Unable to connect with SMB1 -- no workgroup available
2. Check whether cifs-utils is installed
[root@localhost ~]# rpm -q cifs-utils cifs-utils-6.2-10.el7.x86_64 # 如果没有安装 [root@localhost ~]# yum -y install cifs-utils
3.Mount directory
# 创建挂载目录 [root@localhost ~]# mkdir /data [root@localhost ~]# mount.cifs //192.168.88.57/TEST /data # 提示输入密码,不需要输入直接回车 # 查看挂载目录 [root@localhost ~]# df -hT
The above is the detailed content of How to realize file sharing between windows and Linux. For more information, please follow other related articles on the PHP Chinese website!