How can I check the Fedora version from the terminal?

Knowing the version of your Fedora distribution is essential for various reasons, such as ensuring compatibility with software packages and staying informed about updates and support. Fortunately, Fedora provides straightforward methods to check your distribution version directly from the terminal. In this comprehensive guide, we’ll explore different commands and techniques to unveil the version of your Fedora system, empowering you with the knowledge needed for effective system management.

Using the lsb_release Command

1. lsb_release Basics:

  • Command:
    lsb_release -a
  • Example Output:
    Distributor ID: Fedora Description: Fedora release 35 (Workstation Edition) Release: 35 Codename: <Codename>

2. Interpreting Output:

  • Distributor ID: Indicates the distribution name (Fedora).
  • Description: Specifies the Fedora release and edition.
  • Release: Denotes the Fedora version number.
  • Codename: Represents the codename associated with the release.

Examining the /etc/os-release File

1. Using cat Command:

  • Command:
    cat /etc/os-release
  • Example Output:
    NAME=Fedora VERSION="35 (Workstation Edition)" ID=fedora VERSION_ID=35 VERSION_CODENAME=<Codename>

2. Key Information:

  • NAME: Specifies the distribution name.
  • VERSION: Provides the Fedora release and edition.
  • ID: Represents the distribution ID.
  • VERSION_ID: Denotes the Fedora version number.
  • VERSION_CODENAME: Indicates the release codename.

Checking the /etc/fedora-release File

1. Using cat Command:

  • Command:
    cat /etc/fedora-release
  • Example Output:
    Fedora release 35 (Workstation Edition)

2. Simplified Output:

  • The /etc/fedora-release file provides a concise display of the Fedora release and edition.

Using RPM Query

1. Querying Fedora Release Package:

  • Command:
    rpm -q fedora-release
  • Example Output:
    fedora-release-35-1.noarch

2. Extracting Version Information:

  • The output includes the Fedora version number (35) and release details.

Additional Tips

1. Displaying Kernel-Version:

  • Command:
    uname -r
  • The uname command with the -r option displays the kernel version, providing additional system information.

2. Using Hostnamectl Command:

  • Command:
    hostnamectl
  • The hostnamectl command provides comprehensive system information, including the operating system version.

Conclusion

By mastering the art of checking the Fedora version from the terminal, you gain valuable insights into your system’s configuration. Whether using lsb_release, examining configuration files, querying RPM packages, or exploring additional commands, you now possess a diverse set of tools to unveil the version details of your Fedora distribution.

These techniques not only serve as quick reference points for your system’s version but also equip you with the knowledge to troubleshoot compatibility issues, seek support, and stay informed about updates and advancements in the Fedora ecosystem.

Scroll to Top