Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getHostname.System

Retrieves the computer name of the current host


Description

Retrieves the computer name of the current host.

Usage

## Static method (use this):
## System$getHostname(...)

## Don't use the below:
## S3 method for class 'System'
getHostname(static, ...)

Details

First, this function checks the system environment variables HOST, HOSTNAME, and COMPUTERNAME. Second, it checks Sys.info()["nodename"] for host name details. Finally, it tries to query the system command uname -n.

Value

Returns a character string.

See Also


R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.