#!/usr/bin/env python3 # You would think you could count on whoami being present on all # Unix systems, but apparently that isn't always the case. # For systems that do not have a whoami command, # this script should do the same thing. # Note: This script should never be placed in any of the # target directories, such as /usr/local/bin, because # that would result in an infinite loop. import getpass print(getpass.getuser())