OS API

  • os.hostname()
    • Returns the host name of the operating system as a string.
    • eg: 'cloud-2.local'
  • os.platform()
    • Returns a string identifying the operating system platform.
    • eg: 'darwin'
  • os.homedir()
    • Returns the string path of the current user's home directory.
    • '/Users/mac'