편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
1번째 줄: | 1번째 줄: | ||
*리눅스 비트 확인 | |||
*리눅스 BIT 확인하기 | |||
*리눅스가 32비트인지 64비트인지 확인하기 | |||
==방법 1 | ==방법 1== | ||
< | ;명령어 | ||
[root@ | <source lang='bash'> | ||
getconf LONG_BIT | |||
</source> | |||
;예시 | |||
<source lang='dos'> | |||
[root@jmnote ~]# getconf LONG_BIT | |||
32 | |||
</source> | |||
결과값은 32 또는 64. | |||
;스크립트 | |||
<source lang='bash'> | |||
bit = echo `getconf LONG_BIT` | |||
</source> | |||
;예시 | |||
<source lang='dos'> | |||
[root@jmnote ~]# bit=`getconf LONG_BIT` | |||
[root@jmnote ~]# echo $bit | |||
32 | 32 | ||
</ | </source> | ||
==방법 2 | ==방법 2== | ||
;명령어 | |||
< | <source lang='bash'> | ||
uname -m | |||
</source> | |||
</ | *i386 또는 i686이면 32 bit (i386은 매우 구식...) | ||
*x86_64이면 64 bit | |||
;예시 | |||
< | <source lang='dos'> | ||
[root@ | [root@jmnote ~]# uname -m | ||
x86_64 | x86_64 | ||
</ | </source> | ||
;스크립트 | |||
<source lang='bash'> | |||
< | if [ `uname -m` = "x86_64" ] | ||
[ | then bit=64 | ||
else bit=32 | |||
</ | fi | ||
echo $bit | |||
</source> | |||
;예시 | |||
< | <source lang='dos'> | ||
[root@ | [root@jmnote ~]# if [ `uname -m` = "x86_64" ] | ||
> then bit=64 | |||
</ | > else bit=32 | ||
> fi | |||
[root@jmnote ~]# echo $bit | |||
64 | |||
</source> | |||
==같이 보기== | ==같이 보기== | ||
*[[리눅스 버전 확인하기]] | *[[리눅스 버전 확인하기]] | ||
[[분류:리눅스]] | [[분류:리눅스]] | ||
[[분류:bash]] | [[분류:bash]] |