Samba service --- establish shared folders between Ubuntu12.04 and Win7

Just beginning to learn Linux, the entry time will encounter many problems. Here recorded hope that other beginners like me, can learn more in the record, detours!

Entered, first install Ubuntu12.04, ISO image to download the following address:

http://mirrors.aliyun.com

Then installed Ubuntu12.04, installed tutorial below:

https://blog.csdn.net/hong2511/article/details/81270824

Be sure to install the installed tutorial method of partitioning, remember remember remember! ! !

The first part of our first set Ubuntu12.04

1, we first create a Linux and windows shared folder named windows_share.

The directory where we are this time as follows: pwd

Then we modify the properties windows_share this folder:

sudo chmod 777 -R windows_share

This time will let you enter your password for root privileges, and then enter a carriage return. As shown below:

Enter ls -l command, you can see windows_share this folder for any person who is readable and writable ( Note: here permissions can be changed according to their needs )

The next focus is set, here we are ready to work.

Installing ensure Ubuntu12.04 networking: samba server

The first instruction: sudo apt-get install samba

The picture is being installed.

The second instruction: sudo apt-get install samba samba-common

 

After the installation is complete, we want to set samba share files which can be read, configuration files in / etc / samba / directory below,

Before we set back up a bit, just in case you can not find the source file is corrupted.

Backup command: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

 (在修改之前没有安装vim的要安装一下vim,命令是: sudo apt-get install vim 就是这么简单。)

然后输入指令:sudo vi /etc/samba/smb.conf , 如下图:

在文件的最底下加上如图内容

然后保存退出。 :wq

接下来我们重启samba服务器。

输入指令:sudo /etc/init.d/smbd restart ,如下图:

当我们看到smbd start/running, process 7708(7708是进程号,每个人都不一样),就说明我们的samba服务器已经启动了。

然后我们看下我们当前的ip地址是多少。输入:ifconfig 回车

能够看到我们当前的ip是192.168.2.198  记下来,后面要考的。

 

第二部分 我们再设定Windows7

1、打开“我的电脑”,点击“映射网络驱动器”

然后设置如下图:

点击完成后就可以看到这样的界面:

这个时候文件夹里面什么都没有,我们可以添加一个文件。

保存完成以后我们在去Linux系统中查看一下。

这里显示的文件就是我们在windows7下面操作写的文件内容。已经同步到Linux中了。

到这里我们的samba服务器共享文件已经完成了。

 

Guess you like

Origin blog.csdn.net/shao15232/article/details/88406120