우분투 또는 리눅스에서 메모리의 크기를 확인하는 방법을 소개합니다.
1. 전체, 여유 메모리 크기 확인
시스템의 전체(total), 여유(available) 메모리 등의 정보를 확인할 때 free 명령어를 사용할 수 있습니다. free는 KB 단위로 메모리 크기를 보여줍니다.
$ free
total used free shared buff/cache available
Mem: 24540200 4247884 14340440 429564 5951876 19503860
Swap: 2097148 0 2097148
아래와 같이 -h
옵션을 추가하면 메모리 크기를 읽기 좋은 단위로 변환해서 정보를 보여줍니다.
$ free -h
total used free shared buff/cache available
Mem: 23Gi 4.1Gi 13Gi 429Mi 5.7Gi 18Gi
Swap: 2.0Gi 0B 2.0Gi
다른 단위로 출력하고 싶다면, free --help
에서 옵션을 확인하시면 됩니다.
$ free --help
Usage:
free [options]
Options:
-b, --bytes show output in bytes
--kilo show output in kilobytes
--mega show output in megabytes
--giga show output in gigabytes
--tera show output in terabytes
--peta show output in petabytes
-k, --kibi show output in kibibytes
-m, --mebi show output in mebibytes
-g, --gibi show output in gibibytes
--tebi show output in tebibytes
--pebi show output in pebibytes
-h, --human show human-readable output
2. 물리적인 RAM 크기 확인
하드웨어의 물리적인 RAM 크기 및 정보를 볼 때는 sudo dmidecode --type memory | more
명령어를 사용할 수 있습니다. dmidecode는 컴퓨터의 DMI table(SMBIOS) 정보를 사람이 읽을 수 있는 형태로 보여주는 툴이라고 합니다.
$ sudo dmidecode --type memory | more
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
Handle 0x000F, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 32 GB
Error Information Handle: Not Provided
Number Of Devices: 4
Handle 0x0010, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000F
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: DIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Samsung
Serial Number: 19916111
Asset Tag: 9876543210
Part Number: M378B1G73EB0-CK0
Rank: 2
Configured Memory Speed: 1600 MT/s
.....
Loading script...
Related Posts
- Ubuntu에서 draw.io 설치하는 방법
- 리눅스 deb 파일 설치
- 우분투에 VMware 설치하기
- [Ubuntu] VMware에서 Windows 11 설치
- Vi/Vim에서 1줄 또는 여러줄 삭제 방법
- Vi/Vim에서 라인 번호 표시하기
- 우분투에서 rar 압축, 압축 풀기
- Ubuntu에서 구글 드라이브 사용하기 (로컬 폴더에 마운트)
- [Ubuntu] apt-cache search, 설치 가능한 패키지 검색
- Ubuntu - DNS 캐시 삭제 방법
- Ubuntu에서 사용할 수 있는 Text Editor 소개
- 우분투(리눅스) - RAM(메모리) 크기 확인
- 우분투에서 시간대(Timezone) 변경하기
- 우분투(리눅스)에서 Atom 텍스트 에디터 설치
- 우분투(리눅스)에서 Microsoft Edge 브라우저 설치
- 우분투(리눅스)에서 Slack 설치
- 우분투(리눅스)에서 Visual Studio Code 설치
- Linux - 파일, 디렉토리 삭제 명령어(rm -rf, rmdir)
- Linux - 파일이 수정된 날짜/시간 확인 방법
- Linux - touch로 파일 생성, 파일의 날짜/시간 변경
- Linux - Node.js로 Html 파일을 로컬 서버에서 실행하기