Skip to content

Instantly share code, notes, and snippets.

@iamramahibrah
Created April 27, 2021 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamramahibrah/5a8aa2bc7b404325191ba860f56a6ece to your computer and use it in GitHub Desktop.
Save iamramahibrah/5a8aa2bc7b404325191ba860f56a6ece to your computer and use it in GitHub Desktop.
Systeminformation
import platform, getpass, socket
import os
#os func
os.system('clear')
def os():
print("*********System Information**********")
print
node = platform.node()
os = platform.system()
ver = platform.version()
rel = platform.release()
user = getpass.getuser()
hostname = socket.gethostname()
ip = socket.gethostbyname(hostname)
print("Operating System: ",os,rel)
print("Version: ",ver)
print("Hostname: ",node)
print("Username: ",user)
print("Ip Address: ",ip)
os()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment