Linux共享Windows目录

简介: Linux共享Windows目录

window系统版本:Windows 10

Linux系统版本:Centos7.6

一、创建共享用户

1

2

3

4

5

6

7

1. 选择“开始” > “设置” > “帐户”,然后选择“家庭和其他用户”。(在某些版本的 Windows 中,你将看到“其他用户”。)

 

2.选择“将其他人添加到这台电脑”。

 

3.选择“我没有此人的登录信息”,然后在下一页上选择“添加一个没有 Microsoft 帐户的用户”。

 

4. 输入用户名、密码和密码提示,或选择安全问题,然后选择“下一步”。   

二、创建共享目录

1

新建一个文件夹或选择一个已经存在的文件夹,"右键属性" >  "共享" >  "点击共享" "下拉框选择用户并添加" ,默认只有读取权限,可以酌情设置权限  

三、Linux配置并挂载

 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

# 安装依赖

yum install nfs-utils samba-client  

 

 

#查看一下该用户共享权限下的共享情况。其中不带“$”的那个,就是我们可以访问的共享文件夹了,其中“-U”是用来指定查询共享权限的用户名的

smbclient -L //192.168.124.3 -U windows_shared

 

 

#创建Linux挂载目录

mkdir /mnt/windows_shared

 

 

 

#“-o”表示挂载参数,常见的是需要提供共享的用户名和密码,另外需要注意的是iocharset和codepage,这两个参数是用来解决系统之间的字符编码转换的,如果出现乱码的情况,是需要调整这两个参数的

#在mount cifs的时候显式指定一下挂载的cifs是最新的版本vers=2.0

mount -t cifs -o  vers=2.0,username=windows_shared,password=PANpan520 //192.168.124.3/window_shared /mnt/windows_shared/

 

相关文章
|
15天前
|
Web App开发 安全 Ubuntu
Nexpose 8.13.0 for Linux & Windows - 漏洞扫描
Nexpose 8.13.0 for Linux & Windows - 漏洞扫描
43 3
Nexpose 8.13.0 for Linux & Windows - 漏洞扫描
|
1月前
|
NoSQL IDE MongoDB
Studio 3T 2025.11 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
Studio 3T 2025.11 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
111 3
|
2天前
|
Linux API iOS开发
Blender 4.5 (Linux, macOS, Windows) - 开源 3D 创意软件 (渲染 建模 雕刻)
Blender 4.5 (Linux, macOS, Windows) - 开源 3D 创意软件 (渲染 建模 雕刻)
29 1
Blender 4.5 (Linux, macOS, Windows) - 开源 3D 创意软件 (渲染 建模 雕刻)
|
2天前
|
Linux 虚拟化 iOS开发
VMware Workstation 17.6.4 Pro Unlocker & OEM BIOS 2.7 for Windows & Linux
VMware Workstation 17.6.4 Pro Unlocker & OEM BIOS 2.7 for Windows & Linux
50 0
VMware Workstation 17.6.4 Pro Unlocker & OEM BIOS 2.7 for Windows & Linux
|
1月前
|
安全 Linux 网络安全
Metasploit Pro 4.22.7-2025061201 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.7-2025061201 (Linux, Windows) - 专业渗透测试框架
55 3
Metasploit Pro 4.22.7-2025061201 (Linux, Windows) - 专业渗透测试框架
|
7天前
|
Linux iOS开发 MacOS
Krita 5.2.10 (Linux, macOS, Windows) - 开源免费绘画软件
Krita 5.2.10 (Linux, macOS, Windows) - 开源免费绘画软件
20 0
Krita 5.2.10 (Linux, macOS, Windows) - 开源免费绘画软件
|
16天前
|
Linux 虚拟化 iOS开发
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
136 0
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
|
Web App开发 安全 Linux
Nexpose 8.11.0 for Linux & Windows - 漏洞扫描
Nexpose 8.11.0 for Linux & Windows - 漏洞扫描
16 0
|
1月前
|
Dart Linux iOS开发
JEB Pro v5.30 (macOS, Linux, Windows) - 逆向工程平台
JEB Pro v5.30 (macOS, Linux, Windows) - 逆向工程平台
77 0
JEB Pro v5.30 (macOS, Linux, Windows) - 逆向工程平台
|
20天前
|
安全 Linux iOS开发
PVS‑Studio 7.37 for macOS, Linux & Windows - 代码质量安全静态分析
PVS‑Studio 7.37 for macOS, Linux & Windows - 代码质量安全静态分析
34 0