Skip to content

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

class method

Process::UID.from_name

(::String name) -> ::Integer
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)