To work with the OS it is often necessary to know what version is currently installed and what architecture of the processor is used. Since the processor cannot process binary file instructions not of its own architecture, and the OS cannot understand system calls, it is necessary to know this when interacting with software.
What do the kernel and OS version have to do with software execution at all?
Let's briefly consider the complete software processing process. First, the user accesses an executable file of a certain format from his shell, which is also a process, through a system call to the kernel. The kernel creates a child process from our current parent shell and loads the called binary into memory.
It then passes the machine code to the processor for execution, in its ring 3 privileged space. System calls are formed for privileged accesses to hardware devices or the kernel, which is in ring 0. The processor itself executes instructions that have been compiled for its architecture.
How do I know the OS version and processor architecture?
To do this let's open a terminal, in Windows this is done by pressing the shortcut Win+X -> PowerShell, and in Linux Ctrl + Alt + T:
After that, a single command is sufficient for find ubuntu version and another Linux-related OS:
hostnamectl
Where you can see firmware, hostname and other parameters besides architecture and OS versions. Or use the command with a more abbreviated answer to linux ubuntu and other Linux versions:
uname -a
For Windows, to find out the OS version is the command:
systeminfo
To view the processor architecture we can use:
Get-WmiObject Win32_Processor | Select-Object Name, Architecture
Where architecture is labelled with code values, consider each of:
Code 0 - x86 architecture;
Code 1 - MIPS architecture;
Code 2 - Alpha architecture;
Code 3 - PowerPC architecture;
Code 5 - ARM architecture;
Code 6 - Itanium architecture;
Code 9 - x64 architecture;
Code 12 - Unknown architecture.
As a result of executing these commands you should get a list of parameters of the requested objects. If you don't have sufficient resources than you can perform actions on powerful cloud servers. Serverspace provides isolated VPS / VDS servers for common and virtualize usage.