How to change user GECOS information with chfn

The chfn command is usefull if you need to change account user info, such as full name or room name. This is also called GECOS, or finger information.

Watch Free Movies

$ chfn -h
Usage: chfn [-f full_name] [-r room_no] [-w work_ph] [-h home_ph]

The chfn command is most used for changing the fullname: sudo chfn -f "Anakin Skywalker" anakin

Use chfn instead of editing the /etc/passwd file by hand. If you need to change other user account info, use chsh and usermod.

Scroll to Top