Linux command
chfn 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
chfn -f [new_display_name] [username]
Example
chfn -o [new_office_room_number] [username]
Example
chfn -p [new_office_telephone_number] [username]
Example
chfn -h [new_home_telephone_number] [username]
说明
chfn changes user information stored in the GECOS field of /etc/passwd. This information is displayed by the finger command and other utilities that show user details. Users can change their own information; root can change any user's information.
参数
- -f, --full-name _name_
- Set the user's full name
- -o, --office _office_
- Set office room number
- -p, --office-phone _phone_
- Set office phone number
- -h, --home-phone _phone_
- Set home phone number
- -u, --help
- Display help message
FAQ
What is the chfn command used for?
chfn changes user information stored in the GECOS field of /etc/passwd. This information is displayed by the finger command and other utilities that show user details. Users can change their own information; root can change any user's information.
How do I run a basic chfn example?
Run `chfn -f [new_display_name] [username]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --full-name _name_ do in chfn?
Set the user's full name