Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux 與 Windows 檔案互傳實戰:FTP 伺服器 架設與指令操作全指南

編輯:Linux 教學

Linux 主機與 Windows 主機間如何互傳檔案?常見場景:Linux 抓取圖片傳至 Windows 做 Word 插圖,或 Windows 下載 Linux 套件傳回 Linux 安裝。本文採 FTP 協定,Windows 架設 Serv-U 做 FTP 伺服器,Linux 用 ftp 指令上傳/下載,經測試完美滿足需求。

實驗環境

  • A 機:Windows 2000,IP 10.18.34.115(FTP 伺服器)
  • B 機:Linux Red Hat 9.0,IP 10.18.34.251(FTP 客戶端)

Serv-U 安裝與配置

  1. 執行 setup.exe 全選預設
  2. 配置精靈關鍵設定:
    • IP 位址:10.18.34.115
    • 網域名稱:RoseRed
    • 安裝為系統服務:是
    • 允許匿名登入:視需求(例:是)
    • 匿名主目錄:指定目錄,鎖定為根目錄:是
    • 建立具名帳號:是(例:yint,設定密碼)
    • 帳號主目錄:E:\(本文操作目標),鎖定根目錄:是
    • 管理權限:無(普通帳號)
  3. 權限微調:選中用戶 → 「Dir Access」分頁,勾選檔案讀取/寫入、目錄列表/建立/移除等權限

Linux ftp 指令實戰操作

1. 連線 FTP 伺服器

ftp 10.18.34.115
# 輸入用戶名 yint 與密碼,認證通過進入 ftp> 提示符

2. 下載檔案

指令格式範例
getget [remote-file] [local-file]get /rose/1.bmp 1.bmp
mgetmget [remote-files]cd /rose → mget *.*

檔案下載至 Linux 當前工作目錄(如 /root/yint)。

3. 上傳檔案

指令格式範例
putput local-file [remote-file]put 1.bmp /rose/333.bmp
mputmput local-filescd /rose → mput *.bmp

上傳檔案來源為 Linux 當前工作目錄。

4. 斷開連線

bye

掌握此套流程,即可輕鬆實現 Linux-Windows 雙向檔案傳輸。

Copyright © Windows教程網 All Rights Reserved