uname
Command Function
This command is used to display the name, version creation time, system name, and version information of the current operating system.
Syntax
uname [-a | -s | -r | -m | -n | -v | --help]
Table 1 Parameters
Usage
- The uname command displays the name of the current operating system by default.
- Except --help and -a, other parameters can be used together. uname -a is equivalent to uname -srmnv.
Example
Run the following commands:
- uname -a
- uname -ms
Output
Example 1: all information of the operating system
OHOS:/$ uname -a
LiteOS hisilicon 2.0.0.37 Huawei LiteOS 2.0.0.37 Oct 21 2021 17:39:32 Cortex-A7
OHOS:/$
Example 2: operating system name and architecture
OHOS:/$ uname -ms
LiteOS Cortex-A7
OHOS:/$