Technology Encyclopedia Home >How to check the server operating system version?

How to check the server operating system version?

To check the server operating system version, you can use different commands depending on the OS type.

  1. Linux/Unix-based systems:

    • Run cat /etc/os-release to display detailed OS version information.
    • Alternatively, use lsb_release -a (if the lsb-release package is installed).
    • For older systems, uname -a provides kernel version, and cat /etc/*-release may show distribution details.

    Example:

    $ cat /etc/os-release  
    NAME="Ubuntu"  
    VERSION="20.04.3 LTS (Focal Fossa)"  
    ID=ubuntu  
    ID_LIKE=debian  
    PRETTY_NAME="Ubuntu 20.04.3 LTS"  
    
  2. Windows Server:

    • Open Command Prompt and run systeminfo | findstr /B /C:"OS Name" /C:"OS Version".
    • Or check via GUI: Right-click This PC > Properties.

    Example:

    C:\> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"  
    OS Name:                   Microsoft Windows Server 2019 Datacenter  
    OS Version:                10.0.17763 N/A Build 17763  
    

For cloud servers (e.g., Tencent Cloud CVM), you can also check the OS version via the console:

  • Log in to the Tencent Cloud Console, navigate to CVM Instances, select the target server, and view the OS information in the instance details.
  • Alternatively, connect via SSH (Linux) or RDP (Windows) and run the above commands.

If you need automated checks, Tencent Cloud's Cloud Monitor or Custom Metrics can track OS versions for multiple servers.