Occasionally, you may need to find out information about your userid, such as what your userid's numeric value is and what groups you belong to. This information is essential when you're sharing files (as discussed in Chapter 5) because you'll need it to let people access your files and to access theirs. You can easily get information about your userid with id, as shown in Code Listing 7.13.
To check userid information using id:
id
Tip
You can also check someone else's status with id to find out what groups they're in. Just use id userid (substituting the other person's userid for userid, of course).
[ejr@hobbes ejr]$ id uid=500(ejr) gid=500(ejr) groups=500(ejr),10(wheel),100(users) [ejr@hobbes ejr]$ id deb uid=505(deb) gid=505(deb) groups=100(users) [ejr@hobbes ejr]$ |
13.59.100.42