当前位置: 首页 > news >正文

ubuntu安装samba:win10直接访问ubuntu服务器的文件

一、为什么安装samba

samba可以在ubuntu设置共享目录,从而使得同一局域网的win10可以直接访问该共享目录,非常方便,可以直接查看ubuntu服务器的图片或视频。

二、ubuntu换软件源

打开终端,备份原来的源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

如果显示 /etc/apt/sources.list 不存在,直接创建

sudo vim /etc/apt/sources.list

加入以下阿里源

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse focal

输入命令更新源

sudo apt-get update

输入命令更新软件

sudo apt-get upgrade

ubuntu20.04如何更换国内源

三、安装samba
sudo apt-get install samba samba-common
四、配置samba

先备份

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

编辑

sudo vim /etc/samba/smb.conf

在文件最后添加

[csf]
comment = csf home directory
path = /
public = yes
browseable = yes
writeable = yes

意思是把整个根目录共享

然后重启samba服务

sudo systemctl restart smbd
五、win10访问ubuntu目录

在这里插入图片描述
在这里插入图片描述

ubuntu 20.04 安装配置Samba服务,Windows 和 linux协同工作


http://www.mrgr.cn/news/23434.html

相关文章:

  • 在LangChain中初识向量数据库-LLM与向量数据库的惺惺相惜
  • 新版idea菜单栏展开与合并
  • 本周新上技术岗:Java/C/C++/GO语言/测试开发,月薪最高40K!
  • 机器人外呼系统如何使用呢?
  • web项目如何部署到服务器上并运行呢?——使用Tomcat插件
  • 大数据企业经营 振宁无锡
  • HEC-HMS水文模型应用
  • 免费!OpenAI发布最新模型GPT-4o mini,取代GPT3.5,GPT3.5退出历史舞台?
  • 使用Markdown进行计划安排(打钩)?打对勾/对号?
  • 解决冗余,RSTP协议与STP协议
  • 无人驾驶遇上‘超级WiFi‘,低速无人驾驶已成为了主要趋势?
  • Android通知(Notification)中使用PendingIntent
  • 向改变技术世界的“导师们”致敬
  • 通信工程学习:什么是IFMP(Ipsilon流管理协议)
  • HalconDotNet中图像的形态学处理详解
  • Redis:发布(pub)与订阅(sub)实战
  • JavaEE---Spring MVC(6)
  • 运动耳机精选分享,热门骨传导耳机运动好物推荐!
  • 怎么利用接口发送图文彩信
  • 【C++】模板:进阶(仿函数深度剖析)