Skip to contents

Returns the computer name of the current host. First it tries to get the computer name from the environment variables HOST, HOSTNAME or COMPUTERNAME. If this fails it tries to get the computer name from the function Sys.info(). Finally, if this fails it queries the computer name from the command uname -n. Copied from the R.utils package.

Usage

get_hostname()

Value

character(1) of hostname.

Examples

get_hostname()
#>        nodename 
#> "fv-az1426-365"