Usually the users have a full name associated to them, where is that stored?
Asked
Active
Viewed 8,043 times
3 Answers
5
The full names are stored in /etc/passwd.
On the command line you can change it using the command chfn (needs sudo if you want to change other user's names).
Florian Diesch
- 89,643
2
An extension of sboda's answer, extracting only the full name and encapsulating a function. Shows the full name of any user, or by default the current user.
full_user_name() { getent passwd "${1:-$USER}" | cut -d: -f5 | cut -d, -f1; }
Testing:
$ full_user_name
Rodrigo Silva
$ full_user_name gdm
Gnome Display Manager
MestreLion
- 20,726
0
Or if you would like to see the full name of only one user, than you could use:
getent passwd $user_name
sboda
- 512