linux如何挂载windows下的共享文件

简介:

说明:
windows下有一共享文件夹APP,windows本地ip是192.168.9.155
现在需要在linux服务器上挂载这个APP文件夹,linux服务器ip是192.168.9.200

操作记录如下:

1)windows上的准备工作

首先将windows上D盘下的APP文件夹设置为共享。右击APP文件夹的“共享”属性.

选择“特定用户”共享,添加共享用户。如下

 这样,APP文件夹就设置为共享文件夹了,上面的O3zyrm2d4gnp5j2是windows的机器名。查看APP下里面的文件

 

2)linux服务器上的操作

创建挂载目录/mnt/APP

[root@dev ~]# mkdir /mnt/APP

使用mount.cifs进行挂载操作:(下面的用户名和密码是登陆windows的)

[root@dev ~]# mount.cifs //192.168.9.155/APP /mnt/APP/ -o user=administrator,pass=dsff#$TTT

查看下,发现已经挂在上了
[root@dev ~]# ls /mnt/APP/ 
2.sql 3.sql 8633上线sql.zip

[root@dev mnt]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 450G 97G 331G 23% /
tmpfs 3.9G 228K 3.9G 1% /dev/shm
/dev/sda1 194M 34M 150M 19% /boot
//192.168.9.155/APP 123G 12G 111G 10% /mnt/APP

[root@dev mnt]# mount 
/dev/sda2 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
//192.168.9.155/APP on /mnt/APP type cifs (rw)

卸载
[root@dev mnt]# umount /mnt/APP
[root@dev mnt]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 450G 97G 331G 23% /
tmpfs 3.9G 228K 3.9G 1% /dev/shm
/dev/sda1 194M 34M 150M 19% /boot

***************当你发现自己的才华撑不起野心时,就请安静下来学习吧***************
本文转自散尽浮华博客园博客,原文链接:http://www.cnblogs.com/kevingrace/p/5974445.html ,如需转载请自行联系原作者
相关文章
|
4天前
|
自然语言处理 数据库 iOS开发
DBeaver Ultimate Edtion 25.0 Multilingual (macOS, Linux, Windows) - 通用数据库工具
DBeaver Ultimate Edtion 25.0 Multilingual (macOS, Linux, Windows) - 通用数据库工具
40 12
DBeaver Ultimate Edtion 25.0 Multilingual (macOS, Linux, Windows) - 通用数据库工具
|
1月前
|
人工智能 Linux iOS开发
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
56 12
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
|
15天前
|
Linux 虚拟化 Docker
Linux服务器部署docker windows
在当今软件开发中,Docker成为流行的虚拟化技术,支持在Linux服务器上运行Windows容器。流程包括:1) 安装Docker;2) 配置支持Windows容器;3) 获取Windows镜像;4) 运行Windows容器;5) 验证容器状态。通过这些步骤,你可以在Linux环境中顺利部署和管理Windows应用,提高开发和运维效率。
73 1
|
16天前
|
NoSQL IDE MongoDB
Studio 3T 2025.4 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
Studio 3T 2025.4 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
29 0
Studio 3T 2025.4 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
|
16天前
|
安全 Linux iOS开发
Gitea Enterprise 23.4.0 (Linux, macOS, Windows) - 本地部署的企业级 Gti 服务
Gitea Enterprise 23.4.0 (Linux, macOS, Windows) - 本地部署的企业级 Gti 服务
36 0
Gitea Enterprise 23.4.0 (Linux, macOS, Windows) - 本地部署的企业级 Gti 服务
|
20天前
|
数据管理 Linux iOS开发
Splunk Enterprise 9.4.1 (macOS, Linux, Windows) 发布 - 机器数据管理和分析
Splunk Enterprise 9.4.1 (macOS, Linux, Windows) 发布 - 机器数据管理和分析
24 0
Splunk Enterprise 9.4.1 (macOS, Linux, Windows) 发布 - 机器数据管理和分析
|
23天前
|
Linux 网络安全 iOS开发
Metasploit Framework 6.4.49 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.49 (macOS, Linux, Windows) - 开源渗透测试框架
36 0
Metasploit Framework 6.4.49 (macOS, Linux, Windows) - 开源渗透测试框架
|
7月前
|
Ubuntu Linux 虚拟化
安装Windows Linux 子系统的方法:适用于windows 11 版本
本文提供了在Windows 11系统上安装Linux子系统(WSL)的详细步骤,包括启用子系统和虚拟化功能、从Microsoft Store安装Linux发行版、设置WSL默认版本、安装WSL2补丁,以及完成Ubuntu的首次安装设置。
1910 2
|
10月前
|
Linux Windows Ubuntu
Windows 使用 Linux 子系统,轻轻松松安装多个linux
Windows 使用 Linux 子系统,轻轻松松安装多个linux
904 0
Windows 使用 Linux 子系统,轻轻松松安装多个linux
|
10月前
|
存储 Ubuntu 关系型数据库
在Windows WSL (Linux的Windows子系统)上运行的Ubuntu 20.04安装Bacula失败
Bacula 是一个开源的跨平台网络备份工具,提供基于客户端/服务器(CS)架构的企业级备份解决方案。它支持对数据进行备份、恢复以及完整性校验,并且可以运行在多种操作系统上,包括 Windows 和 Linux 等。
108 0