Gecos field


The gecos field, or GECOS field is a field of each record in the /etc/passwd file on Unix, and similar operating systems. On UNIX, it is the 5th of 7 fields in a record.
It is typically used to record general information about the account or its user such as their real name and phone number.

Format

The typical format for the GECOS field is a comma-delimited list with this order:
  1. User's full name
  2. Building and room number or contact person
  3. Office telephone number
  4. Home telephone number
  5. Any other contact information
In most UNIX systems non-root users can change their own information using the chfn or chsh command.

History

Some early Unix systems at Bell Labs used GECOS machines for print spooling and various other services, so this field was added to carry information on a user's GECOS identity.

Other uses

On Internet Relay Chat, the real name field is sometimes referred to as the gecos field. IRC clients are required to supply this field when connecting. Hexchat, an X-Chat fork, defaults to 'realname', TalkSoup.app on GNUstep defaults to 'John Doe', and irssi reads the operating system user's full name, replacing it with 'unknown' if not defined. Some IRC clients use this field for advertising; for example, ZNC defaulted to "Got ZNC?", but changed it to "RealName = " to match its configuration syntax in 2015.