whoami writes your username. id writes more:
text
learner@tidepool:~$ id
uid=1000(learner) gid=1000(learner) groups=1000(learner),27(sudo)uid=1000(learner)your user IDgid=1000(learner)your primary groupgroups=1000(learner),27(sudo)all of your groups
When the computer decides if you can use a file, it uses these numbers.
Other accounts
Give a name to see another account:
text
learner@tidepool:~$ id ana
uid=1001(ana) gid=1001(ana) groups=1001(ana),1500(staff)groups: only the names
text
learner@tidepool:~$ groups
learner sudo
learner@tidepool:~$ groups ana
ana : ana staffAfter a change
Your shell reads your groups when you log in. On a real server, when someone adds you to a group, log out and log in again. Then id shows the new group. In this course, the change shows at once.