Sys.info                package:base                R Documentation

Extract System and User Information

Description:

     Reports system and user information.

Usage:

     Sys.info()

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.

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.

     The first five fields come from the `uname(2)' system call.  The
     login name comes from `getlogin(2)', and the user name from
     `getpwuid(getuid())'

Note:

     The meaning of OS ``release'' and ``version'' is highly
     system-dependent and there is no guarantee that the node or login
     or user names will be what you might reasonably expect. (In
     particular on some Linux distributions the login name is unknown
     from sessions with re-directed inputs.)

Author(s):

     B. D. Ripley

See Also:

     `.Platform'

Examples:

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

