Python 3 Script to Detect Hardware OS Name & Version & System Information Using Platform Module
Jun 3, 2025
Get the full source code of application here:
Show More Show Less View Video Transcript
0:00
uh hello guys uh welcome to this video
0:02
So in this video I will show you how to
0:04
detect uh hardware operating system name
0:07
system information print inside uh the
0:10
command line using a simple Python
0:12
script Uh I will show you in this
0:14
tutorial how to use the built-in
0:17
operating system module which is this OS
0:20
module So as I run the Python script in
0:24
the terminal it will print out
0:26
everything related to the hardware
0:28
operating system So let me just run this
0:30
Python script So as I run this Python
0:33
script you will see all this information
0:35
will be displayed such as the what sort
0:38
of hardware you are using So we are
0:41
using the Windows machine This is my uh
0:45
laptop name Here you will see it will
0:48
give you all the details right here The
0:50
version that we are using and now it
0:52
will also print out what sort of machine
0:55
you're using So we using a Windows
0:57
machine operating system version
1:00
platform Windows
1:02
32 all sort of information it will
1:07
display So for displaying this
1:10
information we have this built-in
1:13
operating system module So first of all
1:15
we
1:16
simply import this operating system
1:20
module After that we can simply print
1:23
out the name of the system by simply
1:26
typing it has a property called as name
1:30
So it will display the name of the
1:32
operating
1:34
system So if I just uh run the script
1:38
here you will see it will display the
1:41
ent which is
1:43
the NT is a family of pro operating
1:46
system for specifically for Windows So
1:49
it will display the operating system
1:51
name and then if you want to display
1:53
what sort of platform that you are using
1:56
So we can simply import the platform
1:58
module and then we can print out uh what
2:01
sort of platform that you are using So
2:03
platform dot
2:06
uame So this is actually the function So
2:09
now it will print out the platform that
2:11
you're using
2:14
Also we can display the operating system
2:16
name as well by using
2:22
platform dot and it contains the system
2:26
function which will display the system
2:29
information and similarly we can display
2:32
the operating system version as well
2:34
Similarly it contains
2:36
the function for version for displaying
2:39
the version
2:44
So if I run this now you will see it
2:47
will display the windows here we using
2:51
the Windows version this is the
2:53
operating system version 10.0
2:56
0 it will
2:59
display and then if you also want to
3:01
display what sort of system that you're
3:04
using so we can import the system module
3:07
and then we can display the platform
3:11
operating system platform So it contains
3:13
the property here of platform and then
3:16
we can even print out the version as
3:20
well by simply saying system dot
3:23
version what sort of version that you're
3:26
using So if I run this now you will see
3:28
it will print out Windows 32 win 32 and
3:32
this is the operating system version
3:34
which is 3.10.5
3:37
So so this is actually essentially the
3:41
bay by by which you can actually display
3:44
hardware operating system related
3:47
information of your respective operating
3:50
system inside
3:51
Python So you can use the built-in
3:54
system module built-in platform module
3:56
and built-in operating system module So
3:59
thank you very much for watching this
4:01
video and also check out my website
4:03
freemediatools.com
4:05
uh which contains uh thousands of tools
#Computers & Electronics
#Software
#Device Drivers
#Operating Systems
#Software Utilities
#Scripting Languages
