• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

chfn: command not found

by Deepika

chfn is a command-line utility in Linux that is used to change the user information associated with a specific user account. This information includes the user’s full name, office location, office phone number, and other details that are stored in the system password file.

To use chfn, you will need to have root privileges or be the owner of the user account that you want to modify. You can then use the following command syntax to change the user information:

# chfn [options] username

This command will prompt you to enter the new user information, which you can enter by typing or pasting the information at the prompt. When you are finished, you can press Enter to save the changes.

If you encounter the below error while running the command chfn:

chfn: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install passwd
Ubuntu apt-get install passwd
Alpine apk add util-linux
Arch Linux pacman -S util-linux
Kali Linux apt-get install passwd
CentOS yum install util-linux-ng
Fedora dnf install util-linux-user
OS X brew install util-linux
Raspbian apt-get install passwd

chfn includes several options that allow you to customize the way it modifies the user information. For example, you can use the -f option to specify the full name, the -o option to specify the office location, and the -p option to specify the office phone number.

For example, to change the full name of the user john to John Smith, you can use the following command:

# chfn -f "John Smith" john

chfn Command Examples

1. Update a user’s “Name” field in the output of `finger`:

# chfn -f new_display_name username

2. Update a user’s “Office Room Number” field for the output of `finger`:

# chfn -o new_office_room_number username

3. Update a user’s “Office Phone Number” field for the output of `finger`:

# chfn -p new_office_telephone_number username

4. Update a user’s “Home Phone Number” field for the output of `finger`:

# chfn -h new_home_telephone_number username

Filed Under: Linux

Some more articles you might also be interested in …

  1. avo: The official command-line interface for Avo (Command Examples)
  2. krita: command not found
  3. Complete Guide to Configuring iSCSI in CentOS / RHEL 7
  4. Installing CentOS / RHEL 7 (step by step with screen shots)
  5. lsblk Command Examples in Linux
  6. mount Command Examples in Linux
  7. ping Command Examples in Linux
  8. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)
  9. qemu-system-x86_64: command not found
  10. virsh: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “glab issue” Command Examples
  • “glab auth” Command Examples
  • “glab alias” Command Examples
  • gixy Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright