Method: LinuxStat::User.get_login
- Defined in:
- lib/linux_stat/user.rb
.get_login ⇒ Object
Calls LinuxStat::Sysconf.get_login()
The username is returned as a String.
It doesn’t get affected by ENV
But if the name isn’t available (say inside a container), it will return an empty String.
This is meant for speed but not for reliability. To get more reliable output, you might try LinuxStat::User.get_user()
155 156 157 |
# File 'lib/linux_stat/user.rb', line 155 def get_login LinuxStat::Sysconf.get_login end |