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
相关推荐
私人珍藏库5 分钟前
笔墨星河 - AI长篇小说生成软件
windows·ai·工具
为java加瓦8 分钟前
IO多路复用的两种触发机制:ET和LT触发机制。以及IO操作是异步的还是同步的理解
java·服务器·网络
charlie11451419115 分钟前
Windows 10 系统编程——线程专题1
c++·windows·学习·线程
爱奥尼欧21 分钟前
【Linux】系统部分——线程安全与线程的单例模式
linux·安全·单例模式
毕业设计论文37 分钟前
个人备忘录的设计与实现
运维·服务器·网络
Justin_192 小时前
nginx反向代理与缓存功能
运维·nginx
TeleostNaCl2 小时前
如何在 Windows 上使用命令设置网卡的静态 IP 地址
网络·windows·经验分享·网络协议·tcp/ip·ip
尹蓝锐2 小时前
在学校Linux服务器上配置go语言环境
linux·运维·服务器
XUE-52113142 小时前
组播实验-IGMP、IGMP Snooping及PIM-DM协议
运维·网络·网络协议·智能路由器
小伟5533 小时前
Keepalived 高可用实战(Ubuntu 24.04)
运维