The computer user must know everything about him. This is necessary not only to increase the status of an experienced user, but also for cases when you need to find, for example, drivers for a video card or processor. This article will help you understand how to find out information about the Linux system.
Host name
The hostname in Linux is often needed when entering any parameters into the system configuration files. If you have such a need, then the easiest way to accomplish this task is with the following command:
hostname
Immediately after its execution, the name of your machine will be displayed in the "Terminal". There is a second way to accomplish the task. The fact is that the name is in the hostname file. You can view it by running the command:
cat /etc/hostname
In the case of a server in Termnial, you can find out its domain name by writing the following command:
dnsdomainname
Computer information
In the Linux operating system, information about the computer can also be viewed in the "Terminal". At the same time, the desired result can be achieved in various ways, for example, by executing one of these commands:
sudo dmidecode -s system-serial-number
If you want to get all the information at once, then run another command:
sudo dmidecode | more
To obtain the desired result, you can also resort to using the lshw utility. However, it is worth noting that it is not installed on all Linux distributions. To use it, run the following commands:
sudo lshw | more sudo lshw -short
CPU Information
As you can see, to get information about the system in Linux, the commands are best suited. So in the case when you need to clarify the characteristics of the processor. To do this, run one of these commands:
cat /proc/cpuinfo lscpu
If there is a need to know the load of this component, then the following utility will come to the rescue:
sudo mpstat
It is worth noting that it is not installed in all OSs, so pre-install it through the "Terminal".
RAM Information
Among all the above information about the system in Linux, you can also find out about RAM. If you need to view statistics on its use, then do:
less /proc/meminfo
If you want to receive information in a more compact form, then resort to using the following commands:
free -m
Distribution and Kernel Information
If you want to read more detailed information about the installed distribution, then use a simple command with a special attribute:
lsb_release -a
The kernel is also an integral part of any system, and information about it is no less important, especially when making any add-ons. There are two commands to display this data:
uname -r
Drive Information
At some point, suspicions of improper operation of the hard drive may crept in, in which case only a few commands will help you learn more about this computer component. For example, to see all the connected solid state drives, you need to run this command:
fdisk -l | grep '^/dev'
Having decided on all the drives and recognizing their names, you can see more detailed information:
fdisk -l /dev/sda
If you want to see everything at once, and if necessary, even make some adjustments, then the cfdisk program is best. Launching it is simple, just register the name in the "Terminal".
Information about connected devices and computer components
Information about the Linux system would be incomplete without taking into account all the components of the computer and the devices connected to it. To learn more, for example, about a sound card, a processor, a video card, and interfaces, just execute one of these commands:
lspci lspci -vvvn | less lspci -vt lspci | grep -i '_'
If you want to learn more directly about the devices connected to the desktop, then it is best to use these commands:
lsusb lsusb -vt
Network Interface Information
The Internet is already firmly embedded in our lives, but on Linux, setting it up can be a problem. So that in the process of entering all the necessary parameters into the configuration files you do not encounter difficulties, familiarize yourself with the characteristics of your network adapter. This can be done through the already familiar lspci command, but there will be a minimum in the output of information. It is better to use one of these:
iwconfig watch -n 1 cat /proc/net/wireless wavemon iw list
GPU Information
Video games are also an integral part of the life of a PC user, so no computer can do without a video chip. And in order, for example, to install the correct drivers, you must at least know its model. The entire list of characteristics of this component can be found in the output of these commands:
lspci | grep -i vga lspci -vvnn | grep VGA
Alternatively, you can use the following line:
sudo lshw -class display
However, the Linux system information obtained from the above commands is superficial. You can find out much more if you consider the manufacturer of the product. So, if you have a video card from NVIDIA, then execute one of these commands in the βTerminalβ:
nvidia-smi nvidia-settings
We should also not forget about AMD video cards, because they also cover a large layer of the market. To find out their characteristics, run this command:
fglrxinfo
Conclusion
Now you know how to find out system information in Linux. It can also be noted that everything is done quite simply, especially since for this you do not even need to install any software - everything is done in the "Terminal".