Sys.info                package:base                R Documentation

_E_x_t_r_a_c_t _S_y_s_t_e_m _a_n_d _U_s_e_r _I_n_f_o_r_m_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Reports system and user information.

_U_s_a_g_e:

     Sys.info()

_D_e_t_a_i_l_s:

     This function is not implemented on all R platforms, and returns
     'NULL' when not available.  Where possible it is based on POSIX
     system calls.

     '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.

_V_a_l_u_e:

     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())'

_N_o_t_e:

     The meaning of OS 'release' and 'version' is 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.)

_S_e_e _A_l_s_o:

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

_E_x_a_m_p_l_e_s:

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

