Home

GECOS

GECOS is the name of a field in the Unix and Unix-like operating system password file, /etc/passwd. It is the fifth field in the standard passwd entry and is traditionally used to store the user’s personal information. In many implementations this field contains a comma-separated list, with the first element typically representing the user’s full name, followed by optional details such as office location, work phone, and home phone. The GECOS field is part of the legacy interface for user account data and is not typically required for authentication; it is mainly used to provide user information to programs that display account details, such as finger, and to login prompts that show the user’s full name.

Origin and naming: The term GECOS is historically associated with early computing environments and is widely

Usage and compatibility: On modern systems, GECOS is stored in the passwd structure as pw_gecos and can

described
as
deriving
from
the
General
Electric
Comprehensive
Operating
System,
reflecting
the
field’s
origins
in
older
time-sharing
and
workstation
systems.
The
exact
expansion
and
origin
are
sometimes
described
differently
in
historical
sources,
but
the
convention
of
the
field
name
has
persisted
in
Unix
variants
as
a
holder
for
“comment”
or
user
information.
be
viewed
with
commands
such
as
getent
passwd
username
or
finger
username.
It
can
be
edited
by
utilities
like
chfn
or
usermod,
depending
on
system
policy.
While
often
populated
with
a
user’s
full
name,
its
content
is
largely
informational
and
not
used
for
authentication.