Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,895 questions

51,826 answers

573 users

How to get OS information on Unix-like systems with Python

1 Answer

0 votes
import platform
import os

def get_system_info():
    print("System Name:", platform.system())
    print("Node Name:", platform.node())
    print("Release:", platform.release())
    print("Version:", platform.version())
    print("Machine:", platform.machine())

get_system_info()



'''
run:

System Name: Linux
Node Name: 8a915177e5b6
Release: 5.10.226-214.880.amzn2.x86_64
Version: #1 SMP Tue Oct 8 16:18:15 UTC 2024
Machine: x86_64

'''

 



answered Jun 6, 2025 by avibootz

Related questions

1 answer 66 views
1 answer 75 views
1 answer 63 views
1 answer 93 views
1 answer 57 views
3 answers 112 views
1 answer 162 views
...