views:

42

answers:

3

I am using debian. Is there a command that will show me what user I am currently logged in as?

I want to use this command in a rails application that I'm building for debugging purposes.

+1  A: 

"whoami" is the command for this

Chathuranga Chandrasekara
+3  A: 

Use the whoami command.

John Topley
+1  A: 

In ruby/rails you can use

require 'etc'
Etc.getlogin

which returns the username of the current user (works on any platform!)

Veger