如何查看Linux操作系统的位数
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
查看linux操作系统的位数有如下三种方法:
1.通过编程实现(C程序):
在程序中返回sizeof(void*)的值(通过指针地址来判断,也可以使用long类型),返回的结果是操作系统的字节数。若返回4则是32位操作系统,返回8即是64位。
关于不同编译器在不同平台上各数据类型的位数,可参见:http://blog.csdn.net/zhangxinbin5/article/details/7929591
2.Shell中getconf命令:
getconf命令可以获取系统的基本配置信息,比如操作系统位数,内存大小,磁盘大小等。
例如获得操作系统位数可以使用如下命令:
getconf LONG_BIT
3. Shell中命令:
uname -a
可以查看操作系统详细名称信息




A beautiful web dashboard for Linux
最近提交(Master分支:27 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)