The linux system operation module is a built-in module, no need to use import to import, and its interface can be called directly in the script scope.
::: tip API
linuxos.name()
:::
No parameters required for this function.
We can also quickly get the view through the following command
xmake l linuxos.name
Some names currently supported are:
::: tip API
linuxos.version()
:::
No parameters required for this function.
The version returned is the semver semantic version object
if linux.version():ge("10.0") then
-- ...
end
::: tip API
linuxos.kernelver()
:::
No parameters required for this function.
What is returned is also a semantic version object, you can also execute xmake l linuxos.kernelver to quickly view.