Learn R Programming

base (version 3.1.0)

Sys.info: Extract System and User Information

Description

Reports system and user information.

Usage

Sys.info()

Arguments

Value

A character vector with fields
sysname
The operating system.
release
The OS release.
version
The OS version.
nodename
A name by which the machine is known on the network (if any).
machine
A concise description of the hardware.
login
The user's login name, or "unknown" if it cannot be ascertained.
user
The name of the real user ID, or "unknown" if it cannot be ascertained.
effective_user
The name of the effective user ID, or "unknown" if it cannot be ascertained. This may differ from the real user in ‘set-user-ID’ processes.
unixThe first five fields come from the uname(2) system call. The login name comes from getlogin(2), and the user names from getpwuid(getuid()) and getpwuid(geteuid())

Details

This function is not implemented on all R platforms, and returns NULL when not available. Where possible it is based on POSIX system calls. (Under Windows, it is obtained by Windows system calls and the last three values are the same.)

Sys.info() returns details of the platform R is running on, whereas R.version gives details of the platform R was built on: they may well be different.

See Also

.Platform, and R.version. sessionInfo() gives a synopsis of both your system and the R session.

Examples

Run this code
Sys.info()
## An alternative (and probably better) way to get the login name on Unix
Sys.getenv("LOGNAME")

Run the code above in your browser using DataLab