identities

on

If you want to know your uid or gid:

knilluz@knilluz-desktop:~>id
uid=1000(knilluz) gid=100(users) groups=33(video),100(users)

(only want the userid: id -u, want to know all groups id’s: id -G, not the id’s but the name of the groups: id -Gn or only the primary group id: id -g or the name of the primary group: id -gn).

To get out of your identitycrisis:

knilluz@knilluz-desktop:~>whoami
knilluz

(same result as: id -un but whoami looks just better)

Or just want to know everybody logged in:

knilluz@knilluz-desktop:~> who
knilluz   :0         2011-05-15 14:36 (console)
pietjepuk pts/3      2011-05-15 20:24
knilluz   pts/0      2011-05-15 22:30

(or want to know how many users are logged in: who -q [q from count :-)], or show a lot (time last system boot (-b), dead processes (-d), login processes (-l), active processes spawned by init (-p), runlevel (-r), last system clock change (-t), and finaly the users logged in (-u)): who -a)