关于linux:linux如何查看系统架构查看系统架构命令

3次阅读

共计 1423 个字符,预计需要花费 4 分钟才能阅读完成。

命令
以下命令简直在所有 Linux 发行版都可用

我是在 3A 那边租的服务器近程连贯的,做做试验挺不便

  1. uname 命令
    uname -m 间接显示 Linux 零碎架构

uname -a 命令也能够显示 Linux 零碎架构,然而还有和其余信息

  1. dpkg 命令
    dpkg 的命令可用于查看 Debian/ Ubuntu 操作系统是 32 位还是 64 位

dpkg –print-architecture

如果以后 Linux 是 64 位则输入 amd64,是 32 位则会输入 i386。

  1. getconf 命令
    getconf 命令次要用于显示零碎变量配置

getconf LONG_BIT

  1. arch 命令
    arch 命令次要用于显示操作系统架构类型。如果输入 x86_64 则示意为 64 位零碎,

如果输入 i686 或 i386 则示意为 32 位零碎。

  1. file 命令
    file 命令能够配合 /sbin/init 或者 /bin/bash 来查看零碎架构类型,与零碎架构雷同:

file /sbin/init
瑞芯微摄像头 arm-linux(很多命令都没有。。。)
[root@RV1126_RV1109 ~]# uname -m
armv7l
[root@RV1126_RV1109 ~]# uname -a
Linux RV1126_RV1109 4.19.111 #11 SMP PREEMPT Sat Sep 18 14:15:22 CST 2021 armv7l GNU/Linux

(dpkg 打印不进去)

[root@RV1126_RV1109 ~]# dpkg –print-architecture
dpkg: unrecognized option ‘–print-architecture’
BusyBox v1.27.2 (2021-01-04 04:03:15 PST) multi-call binary.

Usage: dpkg [-ilCPru] [-F OPT] PACKAGE

Install, remove and manage Debian packages

-i,--install    Install the package
-l,--list    List of installed packages
--configure    Configure an unpackaged package
-P,--purge    Purge all files of a package
-r,--remove    Remove all but the configuration files for a package
--unpack    Unpack a package, but don't configure it
--force-depends    Ignore dependency problems
--force-confnew    Overwrite existing config files when installing
--force-confold    Keep old config files when installing

[root@RV1126_RV1109 ~]#
(没有 getconf 这个命令)

[root@RV1126_RV1109 ~]# getconf LONG_BIT
-sh: getconf: not found
(没有 arch 命令)

[root@RV1126_RV1109 ~]# arch
-sh: arch: not found
(没有 file 命令)

[root@RV1126_RV1109 ~]# file /sbin/init
-sh: file: not found
[root@RV1126_RV1109 ~]# file /bin/bash
-sh: file: not found

正文完
 0