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
相关推荐
数智工坊7 小时前
Zotero自建Ubuntu WebDAV附件同步方案(完美解决存储空间不足)
linux·运维·ubuntu
江畔柳前堤8 小时前
HBM:大语言模型时代的「算力血液」——从内存墙到带宽革命的深度拆解
服务器·人工智能·windows·目标检测·语言模型·自然语言处理·软件工程
ltl9 小时前
HTTP/3 实战:从 QUIC 到 H3 的完整请求链路
linux
独隅9 小时前
GitHub Actions 自动化运维实战:CI/CD 流水线一体化效果展示
运维·自动化·github
ltl9 小时前
POSIX 文件锁:flock、fcntl 与 NFS 上的工程陷阱
linux
ltl9 小时前
CUDA 生态:cuBLAS、cuDNN、NCCL、Triton、CUTLASS
linux
饺子大魔王的男人9 小时前
CentOS部署Cockpit:图形化查看系统、日志与服务状态
linux·运维·centos
不会就选b9 小时前
Linux之信号(二)
linux·运维·服务器
我是小灰灰吖10 小时前
QT在线安装器使用指南:从下载到配置完整教程
linux·qt·ubuntu
GlueNa2SiO310 小时前
第十八章 Linux故障排查与恢复
linux·服务器·笔记·学习