Gecos field

The gecos field, or GECOS field, is a component of each user record in the /etc/passwd file on Unix and Unix-like operating systems.

Uses your system voice; voice and rate in settings.

Snapshot

≈ 2 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

The gecos field, or GECOS field, is a component of each user record in the /etc/passwd file on Unix and Unix-like operating systems. It is the fifth of the seven colon-separated fields in each line of the file.

Originally derived from the General Electric Comprehensive Operating System (GECOS), this field is commonly used to store general information about the user, such as their full name, office number, phone number, or other contact details. While traditionally limited in length and format, modern systems often use it more flexibly, and some fields within GECOS (like room number or phone) may be left blank or omitted.

Format

The typical format for the GECOS field is a comma-delimited list with this order: User's full name (or application name, if the account is for a program) Building and room number or contact person Office telephone number Home telephone number Any other contact information (pager number, fax, external e-mail address, etc.) In most UNIX systems non-root users can change their own information using the chfn or chsh command. Here is an example of GECOS field within an /etc/passwd file in Linux:

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 (IRC), the real name field is sometimes referred to as the gecos field. IRC clients are able to supply this field when connecting. HexChat, an X-Chat fork, defaults to 'realname', TalkSoup.app on GNUstep defaults to 'David Okeamah', 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.

See also

General Comprehensive Operating System

Text derived from https://en.wikipedia.org/w/index.php?oldid=1341407554 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot enwiki-001341407554 · captured 2026-03-03 · not yet sealed in the ledger · verify the chain · version history

Cite this page as: encyclopegia.org, “Gecos field”, snapshot enwiki-001341407554. https://encyclopegia.org/a/gecos-field

Sources cited in this revision

4 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.