Linux

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

Written by Ian Carnaghan · 10 sec read >
  • Knowledge Base
  • Linux
  • How to find your uid(userid) and gid(groupid) in Linux via the command line
  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 resultsuid=1000(username) gid=1000(username) groups=1000(username) ,4(adm),20(dialout),24(cdrom), 46(plugdev),106(lpadmin),121(admin),122(sambashare)

Last Updated On April 07, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

avatar
  Subscribe  
Notify of