Skip to Content
gnux

pinkyx

Show who is logged in, or what is known about users: a lightweight finger.

Mirrors GNU pinky. Run it as pinkyx, or as gnux pinkyx.

Synopsis

pinkyx [OPTION]... [USER]...

GNU reference

Description

pinkyx prints one line per login session (only the given USERs', if any): the login name, the full name, the terminal (marked * when it does not accept messages), how long it has been idle, when the session started and where from. -f drops the heading, -w the full name, -i the full name and the remote host, and -q the idle time too. With -l it prints, for each USER, the login name, the full name, the home directory and shell (unless -b), and the contents of ~/.project (unless -h) and ~/.plan (unless -p). The full name is the user's GECOS name, with & standing for the capitalized login name. Sessions come from the system's login records, as for whox; on Windows they are the signed-in console and Remote Desktop sessions. The shell is read from /etc/passwd, so it is blank for a user kept elsewhere (macOS directory services, LDAP) and on Windows. If both -s and -l are given, the last one wins.

gnux's terminal view (BR-13): on a terminal, the short format is a framed table with a header (left out with -f), each full name whole (GNU cuts it to 19 columns), the columns empty in every row left out and your own logins in the theme's color for what is yours; -l shows each user as a panel titled with the login name. --pretty[=WHEN] and --theme=NAME, options of gnux's own, choose the view (GNUX_PRETTY, GNUX_THEME); piped or redirected output is always GNU's.

Permissions

Reads the login records, the user database and other users' ~/.project and ~/.plan files when they are readable. Changes nothing.

Use cases

  • Seeing who is logged in to a shared machine, with names people recognize.
  • Looking up a colleague's full name, home directory and shell.
  • Checking how long a terminal has been idle before contacting its user.

Flags

      --help                     display this help and exit
  -l, --long                     produce long format output for the specified USERs
      --lookup                   attempt to canonicalize hostnames via DNS
  -f, --omit-heading             omit the line of column headings in short format
  -b, --omit-home-and-shell      omit the user's home directory and shell in long format
  -q, --omit-idle                omit the user's full name, remote host and idle time in short format
  -w, --omit-name                omit the user's full name in short format
  -p, --omit-plan                omit the user's plan file in long format
  -h, --omit-project             omit the user's project file in long format
  -i, --omit-where               omit the user's full name and remote host in short format
      --pretty WHEN[="always"]   the gnux terminal view WHEN: 'always' (the default when WHEN is omitted), 'auto' (the default: on a terminal only), or 'never'; GNUX_PRETTY sets the default
  -s, --short                    do short format output, this is the default (default true)
      --theme NAME               color the view with the built-in theme NAME (gnux theme picks and saves one); GNUX_THEME sets the default
      --version                  output version information and exit

Examples

See who is logged in

pinkyx
Output
Login    Name                 TTY      Idle   When         Where
alice    Alice Liddell       *pts/0    00:12  Oct 20 09:14 10.0.0.7

Look up a user's details

pinkyx -l alice
Output
Login name: alice                       In real life:  Alice Liddell
Directory: /home/alice                   Shell:  /bin/bash

Only the login names, terminals and times, for a script

pinkyx -fq

Check whether one user is logged in

pinkyx -f bob | headx -n 1

Options

Each option has a page of its own, with its usage and examples.

  • -l, --long: Produce long format output for the specified USERs.
  • --lookup: Attempt to canonicalize hostnames via DNS.
  • -f, --omit-heading: Omit the line of column headings in short format.
  • -b, --omit-home-and-shell: Omit the user's home directory and shell in long format.
  • -q, --omit-idle: Omit the user's full name, remote host and idle time in short format.
  • -w, --omit-name: Omit the user's full name in short format.
  • -p, --omit-plan: Omit the user's plan file in long format.
  • -h, --omit-project: Omit the user's project file in long format.
  • -i, --omit-where: Omit the user's full name and remote host in short format.
  • --pretty: The gnux terminal view WHEN: 'always' (the default when WHEN is omitted), 'auto' (the default: on a terminal only), or 'never'; GNUX_PRETTY sets the default.
  • -s, --short: Do short format output, this is the default.
  • --theme: Color the view with the built-in theme NAME (gnux theme picks and saves one); GNUX_THEME sets the default.

Exit status

StatusMeaning
0success: every operand was processed
1failure: an operand could not be processed (diagnosed on standard error), or a command-line mistake

Help in the terminal

pinkyx --help                # options, first examples, exit status
gnux help pinkyx             # this page: the full manual
gnux help pinkyx --OPTION    # one option in depth, with its examples

See also

On this page