The Navigator.oscpu property returns a string that identifies the current operating system.
A string providing a string which identifies the operating system on which the browser is running.Operating system oscpuInfo string formatOS/2 OS/2 Warp x (either 3, 4 or 4.5)Windows CE WindowsCE x.yWindows 64-bit (64-bit build) Windows NT x.y; Win64; x64Windows 64-bit (32-bit build) Windows NT x.y; WOW64Windows 32-bit Windows NT x.yMac OS X (PPC build) PowerPC Mac OS X version x.yMac OS X (i386/x64 build) Intel Mac OS X or macOS version x.yLinux 64-bit (32-bit build) Output of uname -s followed by i686 on x86_64Linux Output of uname -sm
In this table x.y refers to the version of the operating system
function osInfo() {
alert(navigator.oscpu);
}
osInfo(); // alerts "Windows NT 6.0" for exampleUnless your code is privileged (chrome or at least has the UniversalBrowserRead privilege), it may get the value of the general.oscpu.override preference instead of the true platform.