Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Process::UID.from_name

Process::UID.from_name(name) → uid

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

Example
Process::UID.from_name("root") #=> 0
Process::UID.from_name("nosuchuser") #=> can't find user for nosuchuser (ArgumentError)