如何通过命令提示符在 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
How to check the BIOS version or name in Linux through a command prompt?
提问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 root
privileges to run).
BIOS 版本通过SMBIOS表公开。在 Linux 上,我们可以访问它dmidecode
(需要root
特权才能运行)。
To show only BIOS information, use -t bios
to specify that we only want to see entries of the type BIOS, and -q
to 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 -s
to 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
回答by Marius Gedminas
You can also cat /sys/class/dmi/id/bios_version
without having to run dmidecode
as root.
您也可以cat /sys/class/dmi/id/bios_version
不必以dmidecode
root身份运行。
/sys/class/dmi/id
contains 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 head
because it prints the name of the file above the first few lines of the file contents.)
(我使用head
是因为它在文件内容的前几行上方打印文件名。)