Linux chfn command
Updated: 11/30/2020 by Computer Hope
On Unix-like operating systems such as Linux, chfn modifies a user's "finger" information. This information is stored in the file /etc/passwd, and includes the user's real name, work room, work phone number, and home phone number.
This information can be viewed by other users with the finger command.
Syntax
chfn [-f full_name] [-r room_no] [-w work_ph] [-h home_ph] [-o other] [user]
-f full_name | Allows someone to change their full name on their account. |
-r room_no | Allows someone to change their room number on their account. |
-w work_ph | Allows someone to change their work phone number on their account. |
-h home_ph | Allows someone to change their home phone number on their account. |
-o other | Allows someone to change any other notes on their account. |
user | The name of the user who is being changed. |
Examples
chfn
Running the command without any options enables the user to change all the user information.
Note
If you're attempting to change the actual username and not just the description of the user, you may want to edit the password file directly; see the vipw command for more information.
Related commands
chsh — Change login shell.
usermod — Modify a user's account.
passwd — Change a user's password.
vipw — Safely edit the password file.