如何通过命令提示符在 Linux 中检查 BIOS 版本或名称?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20604644/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-07 01:39:15  来源:igfitidea点击:

How to check the BIOS version or name in Linux through a command prompt?

linuxterminalbios

提问by CuriousCase

I want to retrieve the current BIOS version and name while working on the terminal.

我想在终端上工作时检索当前的 BIOS 版本和名称。

What could be the commands to find it?

找到它的命令是什么?

采纳答案by Jonathon Reinhart

BIOS version is exposed through the SMBIOStables. On Linux, we can access this with dmidecode(which requires rootprivileges to run).

BIOS 版本通过SMBIOS表公开。在 Linux 上,我们可以访问它dmidecode(需要root特权才能运行)。

To show only BIOS information, use -t biosto specify that we only want to see entries of the type BIOS, and -qto silence unnecessary output.

要仅显示 BIOS 信息,请使用-t bios来指定我们只想查看 BIOS 类型的条目,并使-q不必要的输出静音。

# dmidecode -t bios -q
BIOS Information
        Vendor: Phoenix Technologies LTD
        Version: 6.00
        Release Date: 02/22/2012
        Address: 0xE72C0
        Runtime Size: 101696 bytes
        ROM Size: 64 kB
        Characteristics:
                ISA is supported
                PCI is supported
                ...
        BIOS Revision: 4.6
        Firmware Revision: 0.0

To get just the BIOS version information, use -sto specify certain strings:

要仅获取 BIOS 版本信息,请使用-s指定某些字符串:

# dmidecode -s bios-vendor
Phoenix Technologies LTD
# dmidecode -s bios-version
6.00
# dmidecode -s bios-release-date
02/22/2012

回答by Tharanga Abeyseela

you can use dmidecode. dmidecode support following operating systems

您可以使用 dmidecode。dmidecode 支持以下操作系统

Linux i386, x86-64, ia64
FreeBSD i386, amd64
NetBSD i386, amd64
OpenBSD i386, amd64
BeOS i386
Cygwin i386
Solaris x86
Haiku i586

http://www.nongnu.org/dmidecode/

http://www.nongnu.org/dmidecode/

回答by Specode

try this

试试这个

usage: dmidecode | less

用法:dmidecode | 较少的

回答by Marius Gedminas

You can also cat /sys/class/dmi/id/bios_versionwithout having to run dmidecodeas root.

您也可以cat /sys/class/dmi/id/bios_version不必以dmidecoderoot身份运行。

/sys/class/dmi/idcontains also other interesting files:

/sys/class/dmi/id还包含其他有趣的文件:

  • bios_date
  • bios_vendor
  • bios_version
  • product_family
  • product_name
  • product_serial
  • product_version
  • bios_date
  • bios_vendor
  • bios_version
  • 产品系列
  • 产品名称
  • product_serial
  • 产品版本

A quick overview of them all can be obtained with

可以通过以下方式获得对它们的快速概览

head /sys/class/dmi/id/*

(I use headbecause it prints the name of the file above the first few lines of the file contents.)

(我使用head是因为它在文件内容的前几行上方打印文件名。)