Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Process::GID.from_name

(::String name) -> ::Integer
Process::GID.from_name(name) → gid

Get the group ID by the name. If the group is not found, ArgumentError will be raised.

Example
Process::GID.from_name("wheel") #=> 0
Process::GID.from_name("nosuchgroup") #=> can't find group for nosuchgroup (ArgumentError)