Typing
tom@gold:~$ id
uid=1000(tom) gid=1000(tom) groups=1000(tom), 4(adm), 108(lpadmin)
This tells me that user "tom" has a User ID (UID) number of 1000 and that his primary group has a Group ID (GID) of 1000 also . Additionally to this is a list of the groups that tom belongs to. Each group has access rights to various things on the system and because Tom is a member of a particular group it gives him access rights to the things that are accessible to that group. Later we look at access in detail.
Another useful command is
tom@gold:~$ who -uH
NAME LINE TIME IDLE PID COMMENT
tom tty1 2022-06-08 15:38 old 1219 (:0)
The Comment shows the name of the computer that has been logged on to. However because I was logging on to my own system I get (:0).
To find the current process working directory;
tom@gold:~$ pwd
/home/tom
This is the starting directory for your terminal.
Every user;
usually;
/home/user-name
Information on users is stored in the file;
/etc/passwd
Groups are defined in the file;
/etc/group
It contains a list of the users that are members of each group.
When you create a file it will be assigned to your primary group. To assign it to another group you must either;
Change your primary group with newgrp before you create the file or change the files group with chgrp.
When you switch the system on if it goes directly to the command prompt then it displays a message which it gets from the file
/etc/issue
You can display information for your account with the id command.
The following commands are not simple and need to be looked at before use;