Get to know your System (using the command line)

Knowing the details of your system is essential for being able to address issues that arise and make the right hardware and software choices to ensure the compatibility and a good performance of your system. While there are quite some diagnostic tools out there, the most solid way to get key information about your system is again through the command line. The following can be applied to any GNU/Linux distribution no matter the version, desktop environment and applications.

1. Linux Kernel

The Linux kernel is essentially the heart of your system, governing the way your software communicates with your hardware. Acting as the connecting layer between the two. Knowing the version of your system's kernel is important for keeping track of your hardware compatibility and revert to older kernel versions as needed. To do this you simply enter the command: uname -v and the version number is printed. Now if you want to know more than that, you may enter uname -a and the terminal will print the kernel vn, your system's name, architecture and kernel time.

Another useful command that concerns our system's kernel is lsmod. This command will allow us to check what kernel modules are currently loaded into our kernel. Modules are important pieces of code that load and unload themselves in our system's kernel dynamically to extend its functionality. An example would be a proprietary driver for our graphics card, or a sound card driver.

2. Operating System

Passing to the next level of importance are the operating system details. Learn what system you are using by typing lsb_release -a on a terminal. This command will display the following by order: LSB modules, OS distributor, OS description/name, release number and the codename.

The desktop environment that is running in your operating system is another important factor that you should be aware of. Check the active session by typing the following command: ls /usr/bin/*session
As I am running elementary OS which uses GNOME, I get the gnome-session as the result. The shell used in this distribution though is a fork of the default GNOME-Shell called Pantheon using a window manager called Gala (fork of Mutter). For whatever else you want to determine its version, you simple type its (package) name followed by --version as shown below for Gala.

3. Hardware

To get a generic overview of your system hardware, you simply type sudo dmidecode -q on a terminal and you will be given a verbose list containing your BIOS version and supported modes, your motherboard manufacturer and model number, your CPU technical details and your RAM characteristics. Moreover, you may also find details about your systems ports and slots occupancy, voltage values, supported speeds and availability. This command is helpful for the determination of how many ram dimm slots there are on your motherboard, what is the maximum speed supported and how many gigabytes of memory you can have in total.
Speaking of RAM, you can quickly check how much RAM memory is installed in your system and how much of it is free by simply typing the free command on a terminal. Details about the swap file are also given through this command.

One thing that won't be displayed in detail by the dmidecode command is your graphics card. To learn more about this wondrous piece of hardware of yours, you may type sudo lshw -class video and you will be given some basic information such as the GPU vendor, model name and architecture.

In addition to the above, you may also type glxinfo to get information about the driver version you are using, the OpenGL version that is supported and a lost of all the modes that your card can support for the active display. This tool is part of the mesa-utils package so you will have to install this beforehand. If you do, you may also try the glxgears command that opens up a 3D rendering window and measures your frames per second in 5 second intervals. This was especially useful in the olden days as a confirmation tool that our proprietary drivers are activated and running properly as the open source driver would perform at a depressingly low level.

For the wifi or network adapter in general you can type sudo lshw -C network similarly to what we did for the graphics card. If your interface supports scanning, you may also type sudo iwlist wlan0 scan to search for available networks within range.

Last, there is a simple but often useful command that generally concerns your peripherals as it detects what devices are connected on your computer's USB ports. To check them you simply type: lsusb on a terminal. Some will output model and manufacturer which is life saving if you're searching for drivers “for that webcam”.

4. X-Org Configuration

Another thing that I find to be very useful for everyday common users is the xset command. By typing xset -q on a terminal, you will get crucial information about your xorg settings and the screen-saver blanking and DPMS mode in particular. For whenever there isn't any other way to disable your screen-saver and avoid the annoying screen blanking, you may enter xset s noblank and press enter. This will only work for the current session though.

Share this page:

4 Comment(s)