我从官方网站下载并安装了 Ubuntu。但是,我不知道我是安装了 32 位还是 64 位版本。
在 Windows 7 中,我可以右键单击“我的电脑”,它会列出它的版本。
有没有一种简单的方法来检查 Ubuntu?
Rin*_*ind 688
我知道至少 2 种方法。打开终端(Ctrl+ Alt+ T)和类型:
uname -a
32 位 Ubuntu 的结果:
Linux discworld 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
而 64 位 Ubuntu 将显示:
Linux discworld 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
较短的版本:
$ uname -i
x86_64
Run Code Online (Sandbox Code Playgroud)
或者
file /sbin/init
32 位 Ubuntu 的结果:
/sbin/init:ELF 32 位LSB 共享对象,Intel 80386,版本 1 (SYSV),动态链接(使用共享库),用于 GNU/Linux 2.6.15,已剥离
而对于 64 位版本,它看起来像:
/sbin/init:ELF 64 位LSB 共享对象,x86-64,版本 1 (SYSV),动态链接(使用共享库),用于 GNU/Linux 2.6.15,已剥离
对于使用 systemd (16.04) 的系统也是如此:
file /lib/systemd/systemd
64 位的结果:
/lib/systemd/systemd:ELF 64 位LSB 共享对象,x86-64,版本 1 (SYSV),动态链接,解释器 /lib64/ld-linux-x86-64.so.2,用于 GNU/Linux 2.6。 32、BuildID[sha1]=54cc7ae53727d3ab67d7ff5d66620c0c589d62f9,已剥离
Fra*_*ard 146
Details
,然后选择“详细信息”图标获取上述屏幕的替代方法:
我知道终端响应很好,但我想这是 GUI 答案。:)
System info
,然后选择系统信息图标Cri*_*lae 91
一个非常简单和简短的方法是:
打开终端,写入以下内容并按Enter。
getconf LONG_BIT
Run Code Online (Sandbox Code Playgroud)
结果数字(在我的例子中是 64)就是答案。
小智 62
参考:我如何知道我运行的是 32 位还是 64 位 Linux?
使用命令:
uname -m
Run Code Online (Sandbox Code Playgroud)
您通常会得到:
i686
Run Code Online (Sandbox Code Playgroud)
对于 32 位(或可能是 i586 或 i386),以及:
x86_64
Run Code Online (Sandbox Code Playgroud)
对于 64 位。
ane*_*hep 29
打开终端并尝试arch
命令。如果它的输出是 x86_64,那么它就是 64 位。如果它说 i686、i386 等,那么它是 32 位的。
但是,确定架构的最佳方法是运行arch
命令并搜索输出。
Avi*_*Raj 24
dpkg --print-architecture
命令将显示您是否安装了 32 位或 64 位 Ubuntu 操作系统。
$ dpkg --print-architecture
amd64
Run Code Online (Sandbox Code Playgroud)
$ dpkg --print-architecture
i386
Run Code Online (Sandbox Code Playgroud)
`
架构检查器
脚本基本上是这样的:
#!/bin/bash
ARCH=$(uname -m)
if [ "$ARCH" = "i686" ]; then
zenity --info --title="Architecture Checker" --text="Your Architecture is 32-Bit"
fi
if [ "$ARCH" = "x86_64" ]; then
zenity --info --title="Architecture Checker" --text="Your Architecture is 64-Bit"
fi
Run Code Online (Sandbox Code Playgroud)
这将需要在一个可执行的文本文件中,并且zenity
需要安装。
归档时间: |
|
查看次数: |
1103948 次 |
最近记录: |