Home Linux How to find your uid(userid) and gid(groupid) in Linux via the command line?
 
 
 

How to find your uid(userid) and gid(groupid) in Linux via the command line?

PDF Print E-mail

Question: How to find your uid(userid) and gid(groupid) in Linux via the command line?

 

Answer: 

  1. Open a new Terminal Window (Command Line) if in GUI mode
  2. Find your username by typing the command:  whoami
  3. Type in the command id username to find your gid and uid
    EXAMPLE of results: uid=1000(username) gid=1000(username) groups=1000(username) ,4(adm),20(dialout),24(cdrom), 46(plugdev),106(lpadmin),121(admin),122(sambashare)



+/-
  • ravi - not working
    this command is not working at command line -- :(
  • TechPortal - @ravi
    I think you are definitely doing something wrong, or it's not supported on your
    system etc. I tested this again and it works on Ubuntu 10.10.
+/- Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
Security Please input the anti-spam code that you can read in the image.
 

Go Daddy $7.49 .com Sale!