English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux finger command

Linux Command大全

The Linux finger command allows users to query information about other users. The information listed includes:

  • Login Name
  • User Name
  • Home directory
  • Shell
  • Login status
  • Mail status
  • .plan
  • .project
  • .forward

Among them, .plan, .project, and .forward are the information in the .plan, .project, and .forward files in the user's Home Directory. If there is none, there is none. The finger command is not limited to querying on the same server and can also search for a user on a remote server. As long as you give an address like E-Mail address: Any general address is fine.

Usage rights: All users.

Syntax

finger [options] user[@address]

Parameter Description:

  • -l  Multi-line display.
  • -s  Single-line display. This option only displays login name, real name, terminal name, idle time, login time, office number, and phone number. If the user in question is a remote server user, this option is invalid.

Online Examples

List relevant information of currently logged-in users

# finger -l //Display user information
Login: root Name: root
Directory: /root Shell: /bin/bash
On since Fri Apr 9 20:17 (CST) on :0 (messages off)
On since Fri Apr 9 20:17 (CST) on pts/1 32 days 22 hours idle
On since Fri Apr 9 20:17 (CST) on pts/3 4 hours 5 minutes idle
(messages off)
On since Wed May 12 18:08 (CST) on pts/4 from 192.168.1.10
On since Wed May 12 18:35 (CST) on pts/5 from 192.168.1.10
7 minutes 54 seconds idle
On since Wed May 12 14:37 (CST) on pts/2 from 192.168.1.10
3 hours 14 minutes idle
On since Wed May 12 14:53 (CST) on pts/7 34 minutes 25 seconds idle
(messages off)
On since Wed May 12 16:53 (CST) on pts/8 from 192.168.1.10
30 minutes 18 seconds idle
Mail last read Mon Mar 31 04:02 2008 (CST)
No Plan.

Display information of specified user

# finger -m hnlinux

Display remote user information

# finger -m [email protected]

The following commands can query the information of the local administrator:

finger root

The result is as follows:

Login: root Name: root
Directory: /root Shell: /bin/bash
Never logged in.
No mail.
No Plan.

Linux Command大全