LinuxMoz

Linux Stuff && Coffee

Chfn Linux Command

The chfn Linux command is used to change the finger info which is stored in the /etc/passwd file. If you don’t give the chfn command any options it will enter interactive mode, when it prompts you for several changes to your user info (to leave a field blank enter the keyword none).

If you are running as a normal user (not root) chfn will prompt for the users password before any information can be modified.

Situations when the Linux chfn command would be used:

  • How to change a Linux users name
  • How to change a Linux users home phone or office number

chfn command example

An example of how to use chfn to modify user details.

1
chfn -options username

chfn command options

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-f, –full-name full-name
Your full name

-o, –office office
Your office room number.

-p, –office-phone office-phone
Your office phone number.

-h, –home-phone home-phone
Specify your home phone number.

-u, –help
Print a usage message and exit.

-v, –version
Print version information and exit.

Comments