Autumn Sale - up to 36% OFF

How to Check Your Linux Distro (5 Easy Methods)

How to Check Your Linux Distro (5 Easy Methods)
Published on Oct 23, 2025 Updated on Oct 23, 2025

Knowing how to identify Linux distributions is a fundamental skill. Distros ship with different features, settings, and configurations. They use different package managers, affecting how software is installed and handled. Some software packages handle well in some distributions and not so well in others. Some share security features not present in others by default. For example, AppArmor is a default security feature included in Debian and Ubuntu distros, not in others like Arch or CentOS. And on goes the list of the differences between various distros.

Thus, knowing the Linux distribution you are handling is crucial in making the right call in system management. In this guide, we explore various ways of identifying a Linux distribution.

#What is a Linux distribution?

A Linux distribution, colloquially called a 'distro', is a complete operating system built on top of the Linux kernel. It comes with an init system, a bootloader, a package manager, and a set of free and open-source software packages, GNU tools, and utilities.

Linux Dedicated Servers with Full Control

Optimize your workloads with customizable Linux bare metal servers, offering high-performance processors, reliable storage, and full root access.

#How to check your Linux distribution

Let’s explore some ways of finding the Linux distribution you are using from the terminal/CLI.

#Using lsb_release command

The lsb_release command displays distribution-specific information, including a particular Linux system's description, release, and codename.

The -a option displays salient distribution-specific details.

Command Line
lsb_release -a
OutputNo LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04 LTS
Release:	24.04
Codename:	noble

Pass the -i option to reveal the distribution name.

Command Line
lsb_release -i
OutputDistributor ID: Ubuntu

The -c option shows the distribution codename.

Command Line
lsb_release -c
OutputCodename:      noble

The -r option displays the release number.

Command Line
lsb_release -r
OutputRelease:        24.04

#Using the hostnamectl command

The hostnamectl command is both a networking and an information CLI tool. You can run it to configure a static name or display OS details.

Without any flags, it displays a plethora of details, including your Linux distribution:

To check your Linux distribution, run the command:

Command Line
hostnamectl

hostnamectl-command

You can filter the distribution type by piping the output to the grep filter as follows:

Command Line
hostnamectl  | grep -i 'Operating System'
Command Line
Operating System: Ubuntu 24.04

#Viewing the /etc/os-release file

The /etc/os-release file is an information-rich text file that contains OS information. The output is rendered in key-value pairs separated by an equals sign. Information displayed to stdout includes OS type, version, and codename.

Command Line
cat  /etc/os-release

view-cat-os-release-file In addition, you can also view the `/etc/issue’ file.

Command Line
cat  /etc/issue
OutputUbuntu 24.04 LTS  \n \l

#Using the Fastfetch CLI tool

Recall the neofetch tool? It's a CLI information tool that had a good run until it was discontinued on April 24, 2024. It's no longer actively supported, and the project is now archived.

Thankfully, a couple of options are available that mirror the functionality of the Neofetch command. One of the best alternatives is the Fastfetch utility. Fastfetch is an improved version of Neofetch that offers better functionality & features. In addition to what Neofetch displays, it offers information about disk space usage, memory utilization, and even local IPv4 addresses.

Check out the installation instructions for each platform.

Without any command-line options, it displays neofetch-like output, but with additional information such as disk usage, local IPv4 address, battery charge, and locale.

Command Line
fastfetch

fastfetch-command

Fastfetch does not come with a configuration file when installed. To generate it, ensure to run the following command:

Command Line
fastfetch --gen-config

The configuration file is stored in your home directory. You can preview this file using the cat command:

Command Line
cat ~/.config/fastfetch/config.jsonc

To view or list all of the modules you can use with fastfetch, run the command:

Command Line
fastfetch --list-modules

This provides a comprehensive list of all the modules that can be invoked from the command line. The list is quite long and includes 73 modules at the time of writing this guide.

Fastfetch lets you choose which modules to print. For example, to display OS information only, run:

Command Line
fastfetch -s OS

fastfetch-command-view-os-distro

You can provide multiple modules separated by a full colon. For example, to display the OS, kernel, uptime, CPU, disk usage, and local IP details, run the command:

Command Line
fastfetch -s OS:Kernel:uptime:cpu:disk:localip

fastfetch-command-view-os-information

You can access the man pages for more information and command options.

Command Line
man fastfetch

Alternatively, you can preview the help page for a quick reference regarding command-line options.

Command Line
fastfetch  -h

And there you have it. Those are the different methods you can leverage to check your Linux distribution.

#Screenfetch

Screenfetch is a bash script CLI program that displays system information in ASCII format. It is still in active development, and supports a myriad of Linux distributions, Windows, Mac, and BSD systems.

Check out the installation instructions from the GitHub page.

To fetch your Linux distribution information, run the command:

Command Line
screenfetch

screenfetch-command-view-os-information

You can get command options for use with screenfetch by viewing the help page.

Command Line
screenfetch -h

#Conclusion

In this guide, we have covered various ways of checking your Linux distribution, including using the fastfetch tool, a fast, feature-rich, and flexible tool for displaying system information. We hope you can now comfortably check your Linux distribution from the command line.

Cloud VPS Hosting

Starting at just $3.24 / month, get virtual servers with top-tier performance.

Share this article

Related Articles

Published on Sep 29, 2025 Updated on Sep 29, 2025

How to Rename Files in Linux Using mv & rename Commands

Learn how to rename files in Linux using mv for basic renaming and rename for advanced batch operations with Perl expressions and file extensions.

Read More
Published on Sep 9, 2025 Updated on Sep 15, 2025

Best Linux Distros for Developers in 2025

Explore the 10 best Linux distros for developers in 2025. Compare features, stability, and use cases to choose the right OS for coding, cloud, and DevOps.

Read More
Published on Sep 4, 2025 Updated on Oct 9, 2025

Top 20 Linux Commands For Cloud and DevOps Engineers

Master essential Linux commands every Cloud and DevOps engineer needs. Boost skills in navigation, file management, monitoring & networking with clear examples.

Read More
We use cookies to ensure seamless user experience for our website. Required cookies - technical, functional and analytical - are set automatically. Please accept the use of targeted cookies to ensure the best marketing experience for your user journey. You may revoke your consent at any time through our Cookie Policy.
build: 9745a8113.1449