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
相关推荐
呉師傅6 分钟前
【使用技巧】Adobe Photoshop 2024调整缩放与布局125%后出现点菜单项漂移问题的简单处理
运维·服务器·windows·adobe·电脑·photoshop
云姜.7 分钟前
线程和进程的关系
java·linux·jvm
heartbeat..9 分钟前
JVM 性能调优流程实战:从开发规范到生产应急排查
java·运维·jvm·性能优化·设计规范
小Tomkk36 分钟前
数据库 变更和版本控制管理工具 --Bytebase 安装部署(linux 安装篇)
linux·运维·数据库·ci/cd·bytebase
赌博羊36 分钟前
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32‘ not found
linux·运维·gnu
木卫二号Coding38 分钟前
第七十九篇-E5-2680V4+V100-32G+llama-cpp编译运行+Qwen3-Next-80B
linux·llama
getapi1 小时前
Ubuntu 22.04 服务器的系统架构是否为 amd64 x86_64
linux·服务器·ubuntu
消失的旧时光-19431 小时前
Linux 入门核心命令清单(工程版)
linux·运维·服务器
艾莉丝努力练剑1 小时前
【Linux:文件】Ext系列文件系统(初阶)
大数据·linux·运维·服务器·c++·人工智能·算法
小天源1 小时前
Cacti在Debian/Ubuntu中安装及其使用
运维·ubuntu·debian·cacti