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
相关推荐
2501_903238659 分钟前
Git Bash:Windows下的强大命令行工具
windows·git·bash·个人开发
chian-ocean18 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=20 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
若云止水29 分钟前
Ubuntu 下 nginx-1.24.0 源码分析 - ngx_init_cycle 函数 - 详解(4)
数据库·nginx·ubuntu
橘子味的茶二29 分钟前
高级系统架构师--第十章:计算机网络
服务器·计算机网络·系统架构
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
紫菜(Nori)1 小时前
短连接服务器压测-wrk
服务器·压力测试
追寻光1 小时前
Cannot find a valid baseurl for repo: base/7/x86_64
linux
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
陆沙1 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos