Linux ftpwho Command
The Linux ftpwho command is used to display information about all users currently logged in via FTP.
Running this command shows which users are currently logged into the system via FTP and what operations they are performing.
Syntax
ftpwho [选项]
Common options:
-hor--help: Display help information.-Vor--version: display version information.
Example
To see which users are currently logged into the FTP server, use the following command:
ftpwho
This command produces output like the following:
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), the process identifier for each FTP session.
- Second column: terminal identifier (TTY), usually
?, indicating that no terminal is associated. - The third column: Process status (STAT), indicating the current state of the process.
- The fourth column: CPU time (TIME), indicating the CPU time used by the process.
- The fifth column: Process name and user information, showing the name of the FTP service along with the username and status of the current connection.
ftpwho Advanced usage of the command
If multiple FTP service instances are running on your system, you can view the user information for a specific service by specifying the service class. For example:
ftpwho -s proftpd
This will only display the user connection information associated with proftpd the specified service.
Some FTP servers support displaying more detailed user information, including the user's IP address, connection time, and so on. 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 executing the ftpwho command, it may be caused by 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:
ftpwhoThe command usually requires administrator privileges to run. You can try usingsudoto elevate privileges:sudo ftpwho
Linux Command Reference