Class Linux

java.lang.Object
io.smallrye.common.os.Linux

public final class Linux extends Object
Utilities pertaining to the Linux operating system.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Returns true if the operating system is the Windows Subsystem for Linux, or false if it is not.
    static boolean
    Returns true if the WSL version is 2 or later, or false if it is not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isWSL

      public static boolean isWSL()
      Returns true if the operating system is the Windows Subsystem for Linux, or false if it is not.
      Returns:
      true if the operating system is the Windows Subsystem for Linux, or false if it is not
    • isWSLv2

      public static boolean isWSLv2()
      Returns true if the WSL version is 2 or later, or false if it is not.
      Returns:
      true if the WSL version is 2 or later, or false if it is not