1.uname -a 查看OS詳細資料
2. file /bin/ls
顯示系統程式資訊,就能看出多少位
3.獲得機器字長
getconf LONG_BIT
4.查看OS版本
cat /proc/version
5.查看os詳細參數資訊
getconf -a
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=
PC server X86 系列
I386--I686 都是32位
x86_64 是 64位
1.uname -a 查看OS詳細資料
2. file /bin/ls
顯示系統程式資訊,就能看出多少位
3.獲得機器字長
getconf LONG_BIT
getconf WORD_BIT
4.查看OS版本
cat /proc/version
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=
查看linux系統位元方法
2007-11-29 10:37
1.直接看看有沒有/lib64目目錄的方法。64位的系統會有/lib64和/lib兩個目錄,32位只有/lib一個。
2.getconf LONG_BIT
(32位的系統中int類型和long類型一般都是4位元組,64位的系統中int類型還是4位元組的,但是long已變成了8位元組inux系統中可用"getconf WORD_BIT"和
"getconf LONG_BIT"獲得word和long的位元。64位系統中應該分別得到32和64。)
3.file /bin/ls 查看基本程式二進位資訊
tata@ubuntu:~$ file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=
1. 查看核心版本命令:
1) [root@q1test01 ~]# cat /proc/version
Linux version 2.6.9-22.ELsmp (bhcompile@crowe.devel.redhat.com) (gcc version 3.4.4 20050721
3.4.4-2)) #1 SMP Mon Sep 19 18:00:54 EDT 2005
2) [root@q1test01 ~]# uname -a
Linux q1test01 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=
查看linux版本:
1) 登入到伺服器執行 lsb_release -a ,即可列出所有版本資訊,例如:
[root@3.5.5Biz-46 ~]# [root@q1test01 ~]# lsb_release -a
LSB Version: :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-
ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
Release: 4
Codename: NahantUpdate2
注:這個命令適用於所有的linux,包括Redhat、SuSE、Debian等發行版。