This is an article for checking the architecture of a machine. The machine in this article is the operating system of a Personal Computer (PC), workstation, laptop or even a server. There are various operkougaating system available. Each of the operating system run in each machine or device has its own way for checking the architecture of it. In this context, the architecture of the operating system refers to the processor or to the Central Processing Unit (CPU) architecture. By far, there are two types of architectures based on the type of the processor or the CPU. The first one is the 32-bit architecture processor or CPU and the second one is the 64-bit architecture processor or CPU.
Retrieving Architecture Information of a Machine
Since there are many operating system available, there are also so many ways or method to retrieve or to extract the information about the operating system architecture. In that case, the following section will consist of several parts. Each part will associated with the type of the operating system where it exist in the machine.
There are several commands in Linux which is useful to retrieve the information about the architecture of the machine. The following are list of those commands for extracting the information about the machine architecture type using uname, getconf and many more available. But in this article, there are only several of the commands usage is available to show.
According to its manual page, uname is quite useful to print system information. In order to print a specific information such as the machine architecture, just print the processor type information. The reason is because the architecture of the machine is related with the type of the processor exist in the machine. The following is the pattern for printing the information about the processor type :
uname -p uname : the command to execute the uname tool -p : additional parameter to print the processor information
For an example, the following is the command execution of the above command pattern :
user@hostname:~$ uname -p x86_64 user@hostname:~$
This is another command available in Linux to get the information about the machine’s architecture. In the manual page, it shows that getconf will help to query system configuration variable. By the term ‘query’, it must have a correct ‘query’ as its parameter to print the right information. Below is the command pattern to print the machine’s architecture type :
If the execution of the above command pattern is done in the command line, below is an example of the output :
[root@hostname ~]# getconf LONG_BIT 64 [root@hostname ~]#
As it exist in the output above, it is printing ’64’. It is indicating that the machine’s architecture type is 64-bit architecture machine.