Ubuntu挂载windows下的共享文件夹

Ubuntu挂载windows下的共享文件夹

更新apt源

如果出现安装失败,需要更新apt源为阿里云
bash 复制代码
# 备份原始文件
sudo cp /etc/apt/sources.list.d/* /etc/apt/sources.list.d.bak/

# 修改文件内容
sudo vim /etc/apt/sources.list

# 替换内容为如下
deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

## Not recommended
# deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

# wq保存退出

# 更新源
sudo apt-get update

正式操作

bash 复制代码
# 安装cifs-utils 工具
sudo apt-get install cifs-utils

# 挂载共享目录
sudo mount -t cifs //<windows_ip>/<shared_folder_path> /mnt/<mount_point> -o username=<username>,password=<password>
# 例如
# sudo mount -t cifs "//192.168.1.100/Shared Folder" /mnt/myshare -o username=user,password=pass

# 取消挂载
sudo umount /mnt/myshare
相关推荐
运维行者_3 分钟前
稳健型微服务性能监控的基本指标
运维·服务器·网络·数据库·系统架构·自动化·存储
若依-咬一口甜6 分钟前
构建docker基础镜像详细步骤
运维·docker·容器
小王要努力上岸2 小时前
[特殊字符] Nginx全栈实战指南:Rocky Linux 10 & Ubuntu 24.04 双系统部署
linux·nginx·ubuntu
linweidong4 小时前
C++ 模块化编程(Modules)在大规模系统中的实践难点?
linux·前端·c++
invicinble8 小时前
对linux形成认识
linux·运维·服务器
小Pawn爷8 小时前
14.VMmare安装ubuntu
linux·运维·ubuntu
技术路上的探险家8 小时前
8 卡 V100 服务器:基于 vLLM 的 Qwen 大模型高效部署实战
运维·服务器·语言模型
有谁看见我的剑了?9 小时前
介绍一款 测试 DNS解析成功率的网站
运维
半桔9 小时前
【IO多路转接】高并发服务器实战:Reactor 框架与 Epoll 机制的封装与设计逻辑
linux·运维·服务器·c++·io
绵绵细雨中的乡音9 小时前
深入理解 ET 与 LT 模式及其在 Reactor 模型中的应用
服务器·网络·php