Looking for system-related information on your Linux, especially Ubuntu? You've come to the right place. In this article, you'll learn the easiest way to find various system-related information like RAM size, GPU, CPU, storage, OS, and more about your Linux system.
1. Find RAM Information
RAM is one of the critical components of the system that caches the running processes for the CPU to streamline process management for better efficiency. A tech enthusiast or gamer always checks the RAM size when they get their hands on a new PC.
To quickly check the amount of RAM (or RAM size) on your PC, run the following command:
$ free -h
Once the above command is issued, a table displaying various information about your RAM and swap memory will be printed. You need to focus on the "total" row next to "mem," which refers to physical RAM.
Since the free command retrieves information from the "/etc/meminfo" system file, you can directly read its content using the cat command.
$ cat /proc/meminfo
The output file will contain various pieces of information, with the one we're interested in located at the top.
2. Find CPU Information
CPUs (Central Processing Units), often referred to as the brain of the computer, are mainly sold by two popular vendors, Intel and AMD. For desktop PCs, they come in two architectures, x86 and x64.
While we won't dig into the information about these architectures, it's worth noting that x86 is an older architecture rarely found in modern PCs, as most now ship with either x64 or ARM (e.g., Raspberry Pi).
To find detailed information about the CPU (or processor) in your system, run the following command:
$ lscpu
It will print the CPU model name, architecture, threads, cores, virtualization type, caches, and other related information about your CPU.
Since the lscpu
command retrieves information from the "/proc/cpuinfo" system file, you can directly view the file content using the cat
command:
$ cat /proc/cpuinfo
The content of the file will be almost identical to the lscpu
command output, with only a few extra details included. However, the one we are interested in will be at the top.
3. Find GPU Information
Two major vendors, AMD and Nvidia, primarily sell the GPU, a highly popular piece of hardware in PCs and a main attraction for gamers, Bitcoin miners, and AI/ML developers. AMD GPUs fall under the Radeon series, while Nvidia's current GPU series is the RTX.
To quickly find out which GPU brand and series you are using, you can run one of the appropriate commands:
# For GPU
$ lspci | grep -i vga
# for Nvidia GPUs
$ nvidia-smi
# for AMD GPUs
$ lspci | grep -i amd
The following is a picture of the second command (fetching Nvidia GPU information):
4. Find Storage Information
If you’re transitioning from a Windows system, it’s important to know that Linux doesn’t have the same partition concept as Windows. While you can create separate partitions for "/root", "/home", and "/swap", they all fall under the root directory. Therefore, checking the size of the root directory can provide a quick overview of the total and available storage space.
To quickly check the amount of total and available storage space in your system, run the following command:
$ df -h
The output might be a bit overwhelming, so focus on the filesystem mounted at root (e.g., /
). If you have separate partitions for home or swap, you can locate them based on their mount locations.
5. Find Operating System Information
One never needs to search for their Windows version since it can be easily distinguished based on the taskbar appearance (at least for now). However, Linux systems often use desktop environments that separate the core system and the GUI part. As a result, identifying the operating system you are running is quite difficult unless you look for it manually.
So, to find out the version of the Linux distribution (or operating system) you are using, run the following command:
$ cat /etc/os-release
The above command reads the contents of the "/etc/os-release" file, which stores OS-related information. To find your OS details, look for the NAME or VERSION value in the output.
Beside this, you can also use the following command to get the same results, but a bit prettier and cleaner.
$ lsb_release -a
6. Find Desktop Environment Information
The desktop environment is specific to Linux, and Windows users might not be familiar with it. Think of it as the GUI interface you interact with when using a Linux system with a graphical user interface, available in various variants, such as GNOME (the most popular), KDE, XFCE, MATE, and others.
Ubuntu, the most popular Linux distro, comes with GNOME, so to find out which GNOME version your Ubuntu system is running, run the following command:
$ gnome-shell --version
To find the version information for all other popular desktop environments, run one of the respective commands:
# for KDE Plasma
$ gnome-shell --version
# for XFCE
$ xfce4-session --version
# for MATE
$ mate-session --version
7. Find Hostname Information
Hostname is useful when you need to share files on the network, as it helps distinguish your system from others. Identifying the hostname on Linux is easier than finding the other system information we've covered so far.
Just open your terminal and look at the username@hostname
prompt. In addition to this, you can run the following command:
$ hostname
Conclusion
In this article, you’ve learned how to find system information such as RAM, CPU, GPU, storage, operating system, and more on your Linux system. If you have any questions or queries related to the article, feel free to share them in the comments section.