Use Samba to share the Linux kernel source on Ubuntu __linux

Source: Internet
Author: User
Tags chmod

(1) First install Smaba service
Install Samba and Smbfs:sudo apt-get install samba Smbfs
Create a shared directory (you do not need to perform this step if the folder already exists)

Set directory permissions: sudo chmod 777/home/[username]/[foldername]
Example: $ sudo chmod 777/home/jack/my_repository/linux
Set up directory sharing: sudo vi/etc/samba/smb.conf
(2) Configure Smaba
Found it:

# security = User

To

security= share
#设为share so you don't need to add Smaba username and password.

At the end of the document, add:

[Share]
#path =/home/[username]/[foldername]
path =/home/jack/my_repository/linux public
= yes
writable = yes

Restart Service: SUDO/ETC/INIT.D/SMBD restart
Note: SMBD is used in the above command, not samba (otherwise you will be prompted "Cannot find command")

Note: The above [username] is the Linux system under the user directory, [foldername] for the folder name, when used to pay attention to replacement.

The IP addresses of the virtual machines and host computers configured here are in a single network segment, ping each other to test the network.
Virtual Machine Ping Host (note that you need to shut down the Windows Firewall, Win7 by default is ping, not aware of the problem at first, thought it was the network settings of their own virtual machine problems, tossing a very early IP configuration, however, there is no egg to use.) /(ㄒoㄒ)/~~)

zfchen@zfchen-e440:~$ Ping 192.168.1.110
ping 192.168.1.110 (192.168.1.110) bytes of data.
Bytes from 192.168.1.110:icmp_req=1 ttl=64 time=0.230 ms bytes from
192.168.1.110:icmp_req=2 ttl=64 Ms

Windows side Firewall settings can refer to this blog--solve the problem that the VirtualBox virtual machine cannot ping the host, add a custom rule to allow the specified IP address to access the native.

Host ping virtual machine (you need to turn off Ubuntu firewall here)

Pinging 192.168.1.106 with 32 bytes of data:
reply from 192.168.1.106: Byte =32 time <1ms ttl=64
reply from 192.168.1.106: bytes =32 Time < 1ms ttl=64

You can see now that the network is ready, in Windows File Manager to access the Smaba shared directory, the shared Linux kernel source path is: \192.168.1.106\share (this is the virtual machine IP address)

Then open the source Insight, new project, specify the source path for \192.168.1.106\share (this process is slow, much slower than my new project in the local area.) /(ㄒoㄒ)/~~)

Now the two sides of the code has been synchronized, but there are some defects, Linux code more use UTF-8 encoding, and the source insight does not support utf-8, so that the code in the Chinese annotation can not be normal display (garbled).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.