Ubuntu Samba
1. 安装samba:
1)sudo apt-get install samba
2)sudo apt-get install smbclient
如果,遇到下列的情况:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
找出apt-get进程PID:
1)sudo ps -aux|grep apt-get
2)sudo kill -9 PID
2.建立共享目录:sudo mkdir -p /media/share
3.编辑配置文件:sudo vi /etc/samba/smb.conf
4.在文件的末尾加入下列的内容,保存退出:
#security=user 后面添加:
security=share
[share]
comment=share
path=/media/share
public=yes
writable=yes
5. 启动:sudo /etc/init.d/smbd start
6. 运行:sudo ifconfig ,查看ubuntu的IP,并确保和主机能够ping通。
7.在主机运行cmd,输入:\\Ubuntu‘’s IP\share
8.增加共享目录的写权限:找到共享目录,运行:sudo chmod a+w ShareDir
学习记录,方便复习