[Work and study notes]-several file sharing methods between Linux and Windows

Source: Internet
Author: User
Tags scp command


During normal development, files are often transmitted or shared between Linux and Linux, and between Linux and Windows (Firewall should be disabled). The following is a summary based on the actual usage:

1. Linux and Windows File Sharing

1. When Linux is a virtual machine

For example, if you install it in VMware, you can directly use its virtual tool VMware Tools to set a shared directory between Windows and Linux (refer to the online document for specific methods based on Linux ), because the shared directory is not in the same partition as the Linux system, it is best not to place it in the partition when compiling the system-related source code.

2. Configure the Samba server

Configure the Samba server in Linux. In this way, you can enter the \ Samba Server IP address in the Windows operating window to access the shared directory in Linux. You can set the read and write permissions as needed. Provides an article on configuring the Samba server under fedora15

3. Use Cisco's TFTP Server

Download a Cisco TFTP Server (Baidu) in windows and set the root directory of the TFTP server for access and download from the TFTP client anywhere else; many development boards now have client commands installed with TFTP. The usage is as follows:

# TFTP-G-r
Filename TFTP Server IP

-G indicates the get file, and-R indicates obtaining the file from remote;

There is also a TFTP server usage method:

# TFTP Cisco Server IP Address

> Get File Name

> Q # indicates exit

The disadvantage of TFTP is that directories cannot be transmitted.

2. Between Linux and Linux (excluding Samba and TFTP)

1. Mount Mounting Mode

Mount the specified directory of the target Linux instance to the specified directory of the local Linux instance.

The wall is closed, the NFS server is turned on, and the NFS directory is specified (see the http://blog.csdn.net/bull_liu/article/details/6514744 for specific settings ):

# Mount-T nfs-O nolock 192.168.0.94:/Linux-test/mnt

2. Use the SCP command

In Linux, this command is generally used as follows (enter the password of the remote system user, if any ):

Get file:

# SCP root@192.168.1.101:/test/Hello. c/mnt/copy a single file

# SCP-r root@192.168.1.101:/test/mnt copy directory

Send File

# SCP/test/Hello. c
Root@192.168.1.101/mnt/copy a single file

# SCP-r/test/root @ 192.168.1.101/mnt/

 

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.