虚拟机 Linux ubuntu16.04 对 windows 设置共享文件夹教程(samba)(ubuntu16.04换源【更换下载源】【更换源】【更新源】)(如果连不上需要开SSH服务)
文章目錄
- 20220324 其實(shí)它這個(gè)換源貌似也沒(méi)必要直接修改配置文件,在ubuntu設(shè)置里也能更換源
- 安裝
- 配置(用戶不要寫(xiě)yg,寫(xiě)你自己的!)
- 換源
- 1、備份原始文件
- 2、打開(kāi)文件
- 3、注釋原文件內(nèi)容添加新地址
- 4、保存退出
- 5、更新源
- 6、更新軟件(不知道干嘛的?)
- SSH服務(wù)
- 20220323 如果還不行,那就是虛擬機(jī)apt安裝的依賴有問(wèn)題了,需要purge 這個(gè) appstreamcli,然后autoremove再u(mài)pgrade一下
20220324 其實(shí)它這個(gè)換源貌似也沒(méi)必要直接修改配置文件,在ubuntu設(shè)置里也能更換源
安裝
安裝samba服務(wù)器
sudo apt-get install samba– sudo apt-get update –
配置(用戶不要寫(xiě)yg,寫(xiě)你自己的!)
mkdir /home/yg/share更改權(quán)限
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 = yg20220211(改):我前面設(shè)置valid users = yg一直搞不定。。。后面干脆不設(shè)置valid users,結(jié)果全公司都能訪問(wèn)到我的共享文件了,后面干脆搞個(gè)單一共享ip得了
hosts allow = 192.168.1.116
參考文章:在share級(jí)別配置samba使其實(shí)現(xiàn)只允許某些ip訪問(wèn)
windows上鍵入ip地址
如果windows拒絕訪問(wèn)請(qǐng)?jiān)趗buntu上卸載samba并換源重新安裝samba,因?yàn)槟阒苯佑美显窗惭b的可能不太行(袁總說(shuō)的)。。。。竟然有這種事
換源
如果apt update或者apt安裝東西出錯(cuò),按下面步驟換源就完了
參考文章:Ubuntu 更換下載源
1、備份原始文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup2、打開(kāi)文件
vi /etc/apt/sources.list3、注釋原文件內(nèi)容添加新地址
新20220211
#阿里云 deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse下面是版本1
# 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 multiverse4、保存退出
ESC + : + wq5、更新源
sudo apt-get update6、更新軟件(不知道干嘛的?)
sudo apt-get dist-upgrade sudo apt-get upgrade參考文章:二. Ubuntu下安裝samba服務(wù)器
SSH服務(wù)
參考文章:xshell安裝與配置,Xftp(不能連接虛擬機(jī)解決方法,sudo apt-get install openssh-server,服務(wù)沒(méi)開(kāi)怎么傳輸數(shù)據(jù)?!)
20220323 如果還不行,那就是虛擬機(jī)apt安裝的依賴有問(wèn)題了,需要purge 這個(gè) appstreamcli,然后autoremove再u(mài)pgrade一下
與50位技術(shù)專(zhuān)家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的虚拟机 Linux ubuntu16.04 对 windows 设置共享文件夹教程(samba)(ubuntu16.04换源【更换下载源】【更换源】【更新源】)(如果连不上需要开SSH服务)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 文件系统挂载的概念
- 下一篇: Arm Linux 交叉编译(交叉编译是