温馨提示×

Ubuntu FileZilla如何安装与配置

小樊
46
2025-10-07 17:48:22
栏目: 智能运维

Installing FileZilla on Ubuntu
FileZilla can be installed on Ubuntu using three methods: the package manager (recommended for stability), Flatpak (for isolation), or a manual download (for latest versions).

  • Package Manager (Recommended):
    Open a terminal and run the following commands to update your package list and install FileZilla:

    sudo apt update
    sudo apt install filezilla
    

    To add Chinese language support, install the localization package:

    sudo apt install filezilla-locales
    
  • Flatpak (Isolated Installation):
    If Flatpak is not installed, add it first:

    sudo apt install flatpak
    

    Add the Flathub repository (a trusted source for Flatpak apps) and install FileZilla:

    flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    flatpak install flathub org.filezilla.FileZilla
    

    Run FileZilla using:

    flatpak run org.filezilla.FileZilla
    
  • Manual Download (Latest Version):
    Visit the FileZilla website, download the .deb package for Ubuntu, and install it via the terminal:

    wget https://download.filezilla-project.org/client/FileZilla_x.x.x_x86_64-linux-gnu.deb  # Replace with latest version
    sudo dpkg -i FileZilla_x.x.x_x86_64-linux-gnu.deb
    

    If dependencies are missing, fix them with:

    sudo apt --fix-broken install
    

Configuring FileZilla for FTP/SFTP Connections
After installation, configure FileZilla to connect to your FTP/SFTP server via the Site Manager (the central tool for managing connections).

  1. Open Site Manager:
    Launch FileZilla and click File > Site Manager (or press Ctrl+S). This opens a window to create and manage server profiles.

  2. Create a New Site:
    Click the New Site button and give your connection a recognizable name (e.g., “My Web Server”).

  3. Enter Server Details:

    • Host: Input the server’s IP address or domain name (e.g., 192.168.1.100 or example.com).
    • Port: Use 21 for FTP or 22 for SFTP (default for secure connections).
    • Protocol: Select SFTP - SSH File Transfer Protocol (recommended for security) or FTP - File Transfer Protocol (if your server doesn’t support SFTP).
    • Login Type: Choose Normal (for username/password authentication) or Anonymous (for public servers).
    • User: Enter your server username (e.g., ftpuser or your Linux username).
    • Password: Enter your server password (leave blank for anonymous login).
  4. Connect to the Server:
    Click Connect. If this is your first time connecting, FileZilla will prompt you to accept the server’s SSL certificate (for SFTP/FTPS) or save the login credentials.

  5. Optional: Configure Advanced Settings:
    After a successful connection, you can adjust transfer settings (e.g., Transfer Mode set to “Auto” for automatic selection of binary/text mode, Transfer Queue size for managing multiple files) or save the configuration for future use by right-clicking the site and selecting Settings.

Basic File Operations in FileZilla
Once connected, you can manage files between your local machine and the server using the intuitive interface:

  • Upload Files: Drag and drop files from the Local Site panel (left) to the Remote Site panel (right), or right-click a local file and select Upload.
  • Download Files: Drag files from the Remote Site panel to the Local Site panel, or right-click a remote file and select Download.
  • Delete Files: Right-click a file in either panel and select Delete (confirm the action when prompted).
  • Sync Folders: Use the Synchronize feature (Commands > Synchronize Directories) to compare and sync local/remote folders automatically.
  • Remote Editing: Double-click a remote file to open it in your default editor (e.g., VS Code, Nano) and edit it directly on the server.

Troubleshooting Common Issues

  • Connection Refused: Ensure the server’s SSH service (for SFTP) or FTP service (for FTP) is running. For SFTP, verify that the SSH port (22) is open on the server.
  • Permission Denied: Check that your server user has the correct permissions to access the target directory (use chmod to adjust permissions if needed).
  • Slow Transfers: Use passive mode (enable in Site Manager > Transfer Settings) if you’re behind a firewall/router, as it allows the server to initiate data connections.
  • GUI Issues: If the interface looks distorted, try resetting FileZilla’s configuration by deleting the ~/.filezilla folder (back up your settings first).

0