uname

The command that prints information about the running operating system kernel; uname -s prints just its name, such as Linux or Darwin.

In more detail

uname -s prints the kernel name, uname -r its release and uname -m the processor architecture. It is a quick way to check which kind of machine a command actually ran on.

Examples

ansible localhost -m ansible.builtin.command -a "uname -s" prints Darwin on a Mac.
uname -sr

Related terms

Taught in

References

Certification courses