In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to share files between Linux and Windows". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to share files between Linux and Windows.
Copy files between Linux and Windows
The step in moving files between Windows and Linux is to download and install tools such as PuTTY's pscp. You can get it from putty.org (remember to download it from the official website and * * compare its md5/sha1 fingerprints) and easily set it up on Windows. PuTTY comes with a terminal emulator (putty) and tools like pscp to copy files securely between Linux and Windows systems. When you enter the PuTTY site, you can choose to install all the tools, or you can choose to install the tools you want, or you can choose a single .exe file.
You also need to set up and run a ssh server on your Linux system. This allows it to support client (Windows side) connection requests. If you have not already installed the ssh server, the following steps can be run on the Debian system (including Ubuntu, etc.):
Sudo apt updatesudo apt install ssh-serversudo service ssh start
For Red Hat and its associated Linux systems, use a similar command:
Sudo yum install openssh-serversudo systemctl start sshd
Note that if you are running a firewall (such as ufw), you may need to open port 22 to allow connections.
Using the pscp command, you can move files from Windows to Linux, and vice versa. The syntax of its "copy from to" command is very simple.
From Windows to Linux
In the command shown below, we copy the files from the user account on the Windows system to the / tmp directory under the Linux system.
C:\ Program Files\ PuTTY > pscp\ Users\ shs\ copy_me.txt shs@192.168.0.18:/tmpshs@192.168.0.18's password:copy_me.txt | 0 kB | 0.1 kB/s | ETA: 00:00:00 | 100% from Linux to Windows
Moving files from Linux to Windows is just as simple. Just reverse the parameters.
C:\ Program Files\ PuTTY > pscp shs@192.168.0.18:/tmp/copy_me.txt\ Users\ shsshs@192.168.0.18's password:copy_me.txt | 0 kB | 0.1 kB/s | ETA: 00:00:00 | 100%
If 1) pscp is in the Windows search path, and 2) your Linux system is in Windows's hosts file, the process can be smoother and easier.
Windows search path
If you use the PuTTY installer to install the PuTTY tool, you may find that C:\ Program files\ PuTTY is in the Windows search path. You can check if this is the case by typing echo% path% at the Windows command prompt (type cmd in the search bar to open the command prompt). If so, you don't need to care about the location of the file system relative to the pscp executable. It may be easier to enter the folder that contains the files you want to move.
C:\ Users\ shs > pscp copy_me.txt shs@192.168.0.18:/tmpshs@192.168.0.18's password:copy_me.txt | 0 kB | 0.1 kB/s | ETA: 00:00:00 | 100% update your Windows hosts file
This is another small patch. With administrator privileges, you can add the Linux system to the hosts file of Windows (C:\ Windows\ System32\ drivers\ etc\ hosts) and use its hostname instead of its IP address. Keep in mind that if your Linux system's IP address is dynamically assigned, it won't always work.
C:\ Users\ shs > pscp copy_me.txt shs@stinkbug:/tmpshs@192.168.0.18's password:hosts | 0 kB | 0.8 kB/s | ETA: 00:00:00 | 100%
Notice that the hosts file for Windows is in the same format as the / etc/hosts file on the Linux system-- IP address, space, hostname. Comments are represented by the # symbol.
# Line Terminator that Linux systems192.168.0.18 stinkbug hates
Remember that lines in the text file on Windows end with carriage returns and newline characters. The pscp tool does not remove carriage returns to make the file look like an Linux text file. Instead, it just makes a complete copy of the file. You can consider installing the tofrodos package, which allows you to use fromdos and todos commands on Linux systems to adjust files moved between platforms.
Share folders between Windows and Linux
Sharing folders is a completely different operation. You eventually mount the Windows folder to your Linux system or the Linux folder to the Windows folder so that both systems can use the same set of files instead of copying files from one system to another. One of the tools for * is Samba, which simulates the Windows protocol and runs on Linux systems.
Once Samba is installed, you will be able to mount the Linux folder to Windows or the Windows folder to Linux. Of course, this is very different from the copied files described earlier in this article. Instead, each of these two systems can access the same file at the same time.
At this point, I believe you have a deeper understanding of "how to share files between Linux and Windows". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.