Merge pull request #4526 from GHLandy/master

[完成翻译] HOW TO USE FTP TO MOVE FILES BETWEEN YOUR COMPUTER AND YOUR ANDROID DEVICE
This commit is contained in:
Xingyu.Wang 2016-10-12 08:46:52 +08:00 committed by GitHub
commit 21dd21120e
2 changed files with 82 additions and 85 deletions

View File

@ -1,85 +0,0 @@
GHLandy Translating
HOW TO USE FTP TO MOVE FILES BETWEEN YOUR COMPUTER AND YOUR ANDROID DEVICE
====
[![How to transfer files between Linux and Android using FTP](https://itsfoss.com/wp-content/uploads/2016/09/linux-ftp-android.jpg)](https://itsfoss.com/wp-content/uploads/2016/09/linux-ftp-android.jpg)
Everyone who has an Android device knows that you can [transfer files by plugging it into your computer with a USB cable](https://itsfoss.com/how-to-connect-kindle-fire-hd-with-ubuntu-12-10/). Not everyone knows that you can use FOSS software to connect to your Android devices wirelessly.
I know that its not the easiest method out there, but this is a fun and geeky way to do it. So if you are in some DIY mood, let me show you how to transfer files between Linux and Android using FTP.
### STEP 1: GET THE NECESSARY SOFTWARE
In order to connect to your Android device, you need two things: an FTP server and an FTP client. There are quite a few of both to choose from. I would recommend [Filezilla](https://filezilla-project.org/) as an FTP client because it is open-source and available on multiple platforms.
My favorite FOSS app store for Android is [F-Droid](https://f-droid.org/). F-Droid has two great FTP server apps: [primitive ftpd](https://f-droid.org/repository/browse/?fdfilter=ftp&fdid=org.primftpd) and [FTP Server (Free)](https://f-droid.org/repository/browse/?fdfilter=ftp&fdid=be.ppareit.swiftp_free). Both require Android 4.0 or newer. I will focus on primitive ftpd in this article, but similar steps can be used for FTP Sever (Free).
### STEP 2: GETTING FAMILIAR WITH THE FTP SERVER
Once you have both the FTP client and server installed, Its time to set up the connection between the two. Lets start with the FTP server on the Android device. First, open primitive ftpd from your app drawer.
[![android-1](https://itsfoss.com/wp-content/uploads/2016/09/android-1-169x300.png)](https://itsfoss.com/wp-content/uploads/2016/09/android-1.png)
Once the app opens, youll be confronted by a bunch of numbers. Dont freak out. Youll see that server has assigned an IP address (in this test case 192.168.1.131). If you look down further, you will see that both FTP and SFTP are currently not running (SFTP is a slightly different protocol that uses SSH to connect.). Below you can see the username, which is currently set to user.
At the top of the screen, there two buttons. One will start the FTP server and the other will take you to settings. Starting the server is self-explanatory.
[![android-2](https://itsfoss.com/wp-content/uploads/2016/09/android-2-169x300.png)](https://itsfoss.com/wp-content/uploads/2016/09/android-2.png)
In the setting menu, you can change the servers username, password and which port the server uses. You can also prevent standby while the server is active, set the server to start on boot or change the theme.
![android-2-2](https://itsfoss.com/wp-content/uploads/2016/09/android-2.2-169x300.png)![android-3](https://itsfoss.com/wp-content/uploads/2016/09/android-3-169x300.png)![android-5](https://itsfoss.com/wp-content/uploads/2016/09/android-5-169x300.png)
### STEP 3: USING FILEZILLA
Now open FileZilla on your system of choice. You have two options on how you use Filezilla. You can either manually type in the IP address, username, password, and port every time you want to move a file or you can store that information on Filezilla. (Note: Every time you start the FTP server the IP address will be different, so you will have to update the number saved on Filezilla.) I will show you both ways.
If you want to do it manually, merely fill in the required spaced at the top of the FileZilla window and hit “quick connect”.
![filezilla-1-2](https://itsfoss.com/wp-content/uploads/2016/09/filezilla-1.2.png)
To save the information, click on the icon below the file menu. This will open the Site Manager dialog box. Fill out the information you want to save. I usually set “login type” to “ask for password” top be a little bit more secure. If you are going to use FTP, you can leave the default, but if you want to use SFTP you have to select it from the Protocol dropdown box.
![filezilla-2](https://itsfoss.com/wp-content/uploads/2016/09/filezilla-2.png)
Click connect, enter your password and you are in. You will see a warning that you are connecting to a new host. You can verify the fingerprint on the screen against what primitive ftpd says. If its correct (and it should be) select the box to add it to the cache, so you dont see this message in the future.
![filezilla-5](https://itsfoss.com/wp-content/uploads/2016/09/filezilla-5.png)
### STEP 4: MOVING FILES
Now youll see an address box that says “local site” and another that says “remote site”. Those represent your computer and your Android device respectively. From here you can browse through your PC and move files to your Android device. I would recommend uploading files into your Downloads folder so you can keep track of them easier. You can either right-click on a file and select upload or download from the popup menu to move it or you can just double click on it.
![filezilla-6](https://itsfoss.com/wp-content/uploads/2016/09/filezilla-6.png)
### STEP 5: CLOSING UP SHOP
When you are done moving files, all you have to do is stop the FTP server on your Android device and close down Filezilla. As easy as that.
### CLOSING THOUGHTS
Im sure that several people will point out that FTP isnt really very secure. I think that this use case is different because the connection will be very short and in most cases, people will do it in the privacy of their own homes.
This is my favorite method of moving files between Linux and Android.
Did you find it helpful? Do you have any suggesting for similar programs? Let us know below in the comments.
[](https://itsfoss.com/how-to-open-run-install-or-execute-a-jar-file-in-ubuntu-linux/)[](https://itsfoss.com/solve-overheating-issue-in-ubuntu-12-10/)
If you found this article interesting, please take a minute to share it on your favorite social media sites.
--------------------------------------------------------------------------------
via: https://itsfoss.com/use-ftp-linux-android/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29
作者:[John Paul ][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/john/

View File

@ -0,0 +1,82 @@
在电脑和安卓设备之间使用 FTP 传输文件
====
[![How to transfer files between Linux and Android using FTP](https://itsfoss.com/wp-content/uploads/2016/09/linux-ftp-android.jpg)](https://itsfoss.com/wp-content/uploads/2016/09/linux-ftp-android.jpg)
使用安卓设备的用户 [使用 USB 线连接电脑来传输文件](https://itsfoss.com/how-to-connect-kindle-fire-hd-with-ubuntu-12-10/),而使用 FOSS 软件来将安卓设备无线连接到电脑却是鲜为人知。
我知道,这并非最简易的方式,但这样做的确很有趣而且感觉很极客。所有,如果你有一些 DIY 精神,让我为你展示如何在 Linux 和 安卓设备之间使用 FTP 来传输文件。
### 第一步:安装必要的软件
为了链接你的安卓设备,至少需要:一个 FTP 服务器和一个 FTP 客户端。这两者则是不少的选择,个人比较推荐 [Filezilla](https://filezilla-project.org/) 作为客户端,因为它的开源以及多平台化。
我最喜欢的 FOSS 安卓应用就是 [F-Droid](https://f-droid.org/)。F-Droid 有两个非常棒的 FTP 服务端应用:[primitive ftpd](https://f-droid.org/repository/browse/?fdfilter=ftp&fdid=org.primftpd) 和 [FTP Server (Free)](https://f-droid.org/repository/browse/?fdfilter=ftp&fdid=be.ppareit.swiftp_free)。这两者都只能运行在安卓 4.0 或者更高的版本中。本文我会集中介绍 primitive ftpd如果使用 FTP Sever (免费) 也是一样的步骤。
### 第二步:熟悉 FTP 服务器
安装好 FTP 客户端和服务端之后,就是设置两者之间的链接了。先从安装设备的 FTP 服务端开始,首先,通过应用启动器打开 primitive ftpd。
[![android-1](https://itsfoss.com/wp-content/uploads/2016/09/android-1-169x300.png)](https://itsfoss.com/wp-content/uploads/2016/09/android-1.png)
打开应用之后,你将看到一大串的数字。不用紧张,你可以看到服务端已经分配到一个 IP 地址 (本文是 192.168.1.131)。往下看将看到FTP 和 SFTP 服务 (SFTP 是一个截然不同的协议,它通过 SSH 进行连接) 都是还未运行的。再往下就是用户名,本文设置为 user。
在屏幕顶端有两个按钮,一个用于开启 FTP 服务,另一个则是设置 FTP 服务。启动服务是不明而喻的了。
[![android-2](https://itsfoss.com/wp-content/uploads/2016/09/android-2-169x300.png)](https://itsfoss.com/wp-content/uploads/2016/09/android-2.png)
在设置菜单中,可以改变服务器的用户名、访问密码以及所使用的端口。并且你可以设置当服务器激活是阻止待机、服务开机自启或者变更主题。
![android-2-2](https://itsfoss.com/wp-content/uploads/2016/09/android-2.2-169x300.png)![android-3](https://itsfoss.com/wp-content/uploads/2016/09/android-3-169x300.png)![android-5](https://itsfoss.com/wp-content/uploads/2016/09/android-5-169x300.png)
### 第三步:使用 Filezilla
现在打开对应你所用系统的 Filezilla。使用 Filezilla 有两种方法:在需要传输文件时输入 IP、用户名、密码和端口或者在 Filezilla 中预先保存这些信息(值得注意的是:基本上,每次你打开 FTP 服务时IP 都会不同的,所用需要更新保存在 Filezilla 中信息)。我会展示这两种方法。
如果你想要手动输入,直接在 Filezilla 窗口上方输入必要的信息然后点击“快速链接”即可。
![filezilla-1-2](https://itsfoss.com/wp-content/uploads/2016/09/filezilla-1.2.png)
需要预先存储信息的话,点击文件菜单下方的按钮,这会打开站点管理器对话框,填写你想要保存的信息即可。通常,我设置“登录类型”为“询问密码”,安全为上。如果使用的是 FTP保存默认但如果使用的是 SFTP必须在协议下拉选项框中进行对于的选择。
![filezilla-2](https://itsfoss.com/wp-content/uploads/2016/09/filezilla-2.png)
点击链接,输入密码即可。你会看到一个链接新主机的警告,这是可以在此验证屏幕上显示的指纹信息是否与 Primitive FTPD 上的一致。如果一致 (也应该是一致的),点击确认添加都已知主机列表,之后就不会出现该警告了。
![filezilla-5](https://itsfoss.com/wp-content/uploads/2016/09/filezilla-5.png)
### 第四步:传输文件
现在,你看两个框,一个是“本地站点”,一个是“远程站点”,对应的呈现了你电脑和安装设备上的目录和文件信息。然后你就可以在电脑端浏览和传输文件到你的安卓设备上了。个人建议上传文件到你的 Download 文件夹,以便于文件跟踪管理。你可以右击某个文件,在弹出的菜单中选择上传或者下载以及移动操作,或者简单双击也行。
![filezilla-6](https://itsfoss.com/wp-content/uploads/2016/09/filezilla-6.png)
### 第五步:停止服务
当你完成文件的传输之后,你需要做得就是停止安卓设备上的 FTP 服务和关闭 Filezilla如此简单不是吗
### 结论
我相信会有人指出FTP 并不安全。而我认为,本例不需要考虑这个问题,因为连接时间一般很短。并且多数情况下,都是在家庭私有网络环境中进行操作。
这就是我在 Linux 和安卓设备间最喜欢使用的方法。
觉得有用吗?或有又没觉得推荐的相似软件?请在评论中告诉我们。
[](https://itsfoss.com/how-to-open-run-install-or-execute-a-jar-file-in-ubuntu-linux/)[](https://itsfoss.com/solve-overheating-issue-in-ubuntu-12-10/)
如果觉得此文有用,清花几分钟分享到你常用的社交站点中。
--------------------------------------------------------------------------------
via: https://itsfoss.com/use-ftp-linux-android/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29
作者:[John Paul ][a]
译者:[GHLandy](https://github.com/GHLandy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/john/