Linux ftpwho Command

Linux 命令大全Complete Linux Commands

The Linux ftpwho command is used to display information about all users currently logged in via FTP.

Running this command lets you see which users are currently logged into the system via FTP, and what operations they are performing.

Syntax

ftpwho [选项]

Common options:

  • -hor--help: Displays help information.
  • -Vor--version: Displays version information.

Examples

To find out which users are currently logged into the FTP server, you can directly use the following command:

ftpwho

This command produces the following output:

After running this command, you will see output similar to the following:

Service class all:
    10000 ?        S      0:00 proftpd: (accepting connections)
    10001 ?        S      0:00 proftpd: user1 - idle
    10002 ?        S      0:00 proftpd: user2 - uploading file.txt

Output explanation:

  • First column: Process ID (PID), representing the process identifier of each FTP session.
  • Second column: Terminal identifier (TTY), usually?, indicating no associated terminal.
  • Third column: Process status (STAT), indicating the current status of the process.
  • Fourth column: CPU time (TIME), indicating the CPU time consumed by the process.
  • Fifth column: Process name and user information, showing the name of the FTP service as well as the username and status of the current connection.

ftpwhoAdvanced usage of the command

If your system runs multiple FTP service instances, you can view user information for a specific service by specifying the service class. For example:

ftpwho -s proftpd

This will only displayproftpduser connection information related to the service.

Some FTP servers support displaying more detailed user information, including the user's IP address, connection time, etc. You can view it with the following command:

ftpwho -v

This will show more detailed output, helping you better understand each user's connection status.


Common Problems and Solutions

If you encounter problems when running theftpwhocommand, it may be due to the following reasons:

  • FTP service is not installed or not running: Make sure the FTP service is installed and running on your system.

  • Insufficient permissions:ftpwhoThis command usually requires administrator privileges to execute. You can try usingsudoto elevate privileges:sudo ftpwho

Linux 命令大全Complete Linux Commands

Other Extensions