Using chfn Command In Linux [Examples]

chfn command in linux

chfn command in Linux operating system is basically a way allowing users to change user’s name and more other related details. the term chfn technically stands for Change Finger. Means, it will be used in order to alter finger information on a Linux system and the information is stored in an a file at /etc/passwd which includes user’s name, and more other details like phone number, contact address, and so on.

Syntax to use chfn command in Linux

chfn [option] [login]

Available options to use with chfn command

  • -f full_name : Used for changing the full name on the user account.
  • -w work_ph : Used for altering the work phone number of a user.
  • -r room_no : Used for changing the room number details of a user.
  • -h home_ph : Used for altering home phone number details of a user.
  • -o other : Used for modifying more other details related to user.

Example of chfn command

In this example, we’ll use chfn command without any option and the system will ask various details to be entered for a user acocunt.

chfn

chfn command in linux