Find An Available GID

I use this command whenever I have to add a group id (UGID) to the system in the area usually reserved for system groups only (below 500 on some systems and below 1000 on others).  It's nice to be able to see what GID below 500 or 1000 is available before creating a new group with a specific UGID value

cat /etc/group | sed -e 's/:/ /g' | awk '{print $3}' | sort -n 

This entry was posted in CLI HOWTOs, HOWTOs. Bookmark the permalink.