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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

chfn Command Examples in Linux

by admin

The chfn (change finger) command updates a few pieces of personal information maintained by the system: real name, home telephone, office telephone, and office location, as displayed by the finger command.[21] Invoked without a username, chfn affects your account; invoked with a username (by the superuser), it affects that user. With no options, chfn will prompt you for the desired information:

# chfn
Password: ********
Name [Shawn Smith]: Shawn E. Smith
Office [100 Barton Hall]:
Office Phone [212-555-1212]: 212-555-1234
Home Phone []:

Syntax:

# chfn [options] [username]

chfn Command Examples

1. To change the full name of the user:

# chfn -f "Mike Jackson" mike

2. To specify the office room number:

# chfn -o 107 mike

3. To specify the office phone:

# chfn -p 20123023 mike

4. To print the usage message for a user:

# chfn -u mike

Conclusion

chfn command changes the information that is stored in /etc/passwd and displayed to the finger query. With no options, chfn enters interactive mode and prompts for changes. To blank a field, enter the keyword none. Only a privileged user can change information for another user. For regular users, chfn prompts for the user’s password before making the change.

Filed Under: Linux

Some more articles you might also be interested in …

  1. fail2ban-client Command Examples in Linux
  2. How to Audit for Modifications to files and Executions of Files in Linux
  3. udevadm Command Examples in Linux
  4. fgrep Command Examples in Linux
  5. How To Remove Disk from a LVM Volume Group
  6. How to Find Number of CPU Sockets on a CentOS/RHEL System
  7. ethtool Command Examples in Linux
  8. mons Command Examples in Linux
  9. i3lock Command Examples in Linux
  10. lvchange Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright