View PlGroup Systeminfo
ID | 43 |
---|---|
Text | Systeminfo |
Title | Systeminformationen |
PlItems
- echo gethostname(); // prints myComputer1 or srvLinux1
- SELECT HOST_NAME() AS Hostname; -- prints myComputer1 or srvWindows1
- $myHostname = [system.environment]::MachineName; write-host $myHostname; # prints MyComputer1 or srvWindows2
- import os os.name # nt, posix import platform platform.system() # 'Windows', 'Linux', 'Darwin' platform.release() # Linux, Windows, Windows, Darwin '2.6.22-15-generic', 'Vista' ,'10', '8.11.1' # Example from https://stackoverflow.com/questions/1854/python-what-os-am-i-running-on from sys import platform as _platform if _platform == "linux" or _platform == "linux2": # linux elif _platform == "darwin": # MAC OS X elif _platform == "win32": # Windows elif _platform == "win64": # Windows 64-bit