虚拟机 Linux ubuntu16.04 对 windows 设置共享文件夹教程(samba)(ubuntu16.04换源更换下载源)
Posted Dontla
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了虚拟机 Linux ubuntu16.04 对 windows 设置共享文件夹教程(samba)(ubuntu16.04换源更换下载源)相关的知识,希望对你有一定的参考价值。
安装
安装samba服务器
sudo apt-get install samba
– sudo apt-get update –
配置(用户不要写yg,写你自己的!)
mkdir /home/yg/share
更改权限
sudo chmod 777 /home/yg/share
备份配置文件
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
修改配置文件
sudo gedit /etc/samba/smb.conf
在文末添加
[winshare]
path = /home/yg/share
available = yes
browseable = yes
public = yes
writable = yes
valid users = yg
yg@ubuntu:~$ sudo /etc/init.d/samba restart
[ ok ] Restarting nmbd (via systemctl): nmbd.service.
[ ok ] Restarting smbd (via systemctl): smbd.service.
[ ok ] Restarting samba-ad-dc (via systemctl): samba-ad-dc.service.
windows上键入ip地址
如果windows拒绝访问请在ubuntu上卸载samba并换源重新安装samba,因为你直接用老源安装的可能不太行(老袁说的)。。。。竟然有这种事
换源
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
以上是关于虚拟机 Linux ubuntu16.04 对 windows 设置共享文件夹教程(samba)(ubuntu16.04换源更换下载源)的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu 16.04下使用VirtualBox虚拟机安装Windows XP win7 linux 安装虚拟机
VMware虚拟机 Linux系统 Ubuntu 16.04 硬盘/磁盘扩容(超详细图文详解!亲测有效!)
虚拟机WMWare12.5中安装Ubuntu16.04LTS并建立嵌入式Linux开发环境
win10系统 VMWare12.5虚拟机 Ubuntu 16.04 LTS 开始我的Linux学习