openharmony 鸿蒙 kernel-small-debug-shell-cmd-uname

2022-08-09 浏览 (826)

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 Parameter description

ParameterDescription
--helpDisplays help information.
No parameterDisplays the operating system name by default.
-aDisplays all data.
-sDisplays the operating system name.
-rDisplays the kernel release version.
-mDisplays the operating system architecture name.
-nDisplays the network domain name of the host.
-vDisplays version information.

Usage Guidelines

  • 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.

Note

The -r, -m, and -n parameters are not supported currently. mksh supports these parameters. To switch to mksh, run cd bin and ./mksh.

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 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:/$

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Kernel

harmony 鸿蒙Kernel Coding Specification

harmony 鸿蒙Standard Libraries

harmony 鸿蒙Interrupt Management

harmony 鸿蒙Event

harmony 鸿蒙Mutex

harmony 鸿蒙Queue

harmony 鸿蒙Semaphore

harmony 鸿蒙Doubly Linked List

harmony 鸿蒙Memory Management

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/3bc45129144b40ccb1f9008ba1c61930