![Hostnamectl이 arm64를 반환하지만 uname이 aarch64를 반환하는 이유는 무엇입니까? (라즈베리 파이의 우분투 20.04.2)](https://linux55.com/image/200035/Hostnamectl%EC%9D%B4%20arm64%EB%A5%BC%20%EB%B0%98%ED%99%98%ED%95%98%EC%A7%80%EB%A7%8C%20uname%EC%9D%B4%20aarch64%EB%A5%BC%20%EB%B0%98%ED%99%98%ED%95%98%EB%8A%94%20%EC%9D%B4%EC%9C%A0%EB%8A%94%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F%20(%EB%9D%BC%EC%A6%88%EB%B2%A0%EB%A6%AC%20%ED%8C%8C%EC%9D%B4%EC%9D%98%20%EC%9A%B0%EB%B6%84%ED%88%AC%2020.04.2).png)
Ubuntu 20.04.3 LTS를 실행하는 Raspberry Pi가 있습니다. 명령에 따라 두 가지 다른 아키텍처가 반환됩니다.건축 64그리고ARM64. 왜?
CPU 이름
ubuntu@ubuntu:~$ hostnamectl
Static hostname: plex
Icon name: computer
Machine ID: 5d1b763f15314c999d1b33e60d8d556f
Boot ID: bdd535b62f134f6a9216543b36deb678
Operating System: Ubuntu 20.04.3 LTS
Kernel: Linux 5.4.0-1047-raspi
Architecture: arm64
이름을 밝히다
ubuntu@ubuntu:~$ uname --all
Linux plex 5.4.0-1047-raspi #52-Ubuntu SMP PREEMPT Wed Nov 24 08:16:38 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
감사합니다! (이것이 문제의 원인이라고 생각합니다. 뭔가 설치를 시도했는데 aarch64를 찾고 있었지만 찾지 못했지만 amd64용 버전이 있는 것을 알 수 있습니다.
답변1
aarch64
그리고 arm64
그것은 정확히 동일한 아키텍처입니다. 대부분의 패키저와 패키지 관리자는 aarch64
이름을 사용하지만 systemd의 경우 arm64
여기에서 자세한 정보를 찾을 수 있습니다.
이 코드에서는 Arm64 아키텍처의 aarch64
매뉴얼 arm64
페이지가 표준 지정자에도 사용됩니다(어떤 매뉴얼 페이지인지는 모르겠지만 코드는 다음과 같습니다.https://github.com/systemd/systemd/blob/5efbd0bf897a990ebe43d7dc69141d87c404ac9a/man/standard-specifiers.xml).
이 페이지는 해당 아키텍처가 systemd.unit 매뉴얼 페이지에 나열되어 있음을 알려줍니다. 여기에 추출물이 있습니다 man 5 systemd.unit
.
ConditionArchitecture=
Check whether the system is running on a specific
architecture. Takes one of "x86", "x86-64", "ppc", "ppc-le",
"ppc64", "ppc64-le", "ia64", "parisc", "parisc64", "s390",
"s390x", "sparc", "sparc64", "mips", "mips-le", "mips64",
"mips64-le", "alpha", "arm", "arm-be", "arm64", "arm64-be",
"sh", "sh64", "m68k", "tilegx", "cris", "arc", "arc-be", or
"native".
The architecture is determined from the information returned
by uname(2) and is thus subject to personality(2). Note that
a Personality= setting in the same unit file has no effect on
this condition. A special architecture name "native" is
mapped to the architecture the system manager itself is
compiled for. The test may be negated by prepending an
exclamation mark.
이 간단한 조사를 통해 나는 systemd가 uname
시스템 호출을 사용하여 내부적으로 인쇄 aarch64
하고 변경한다는 것을 추론했습니다 arm64
.