新升級系統內存,從原來的2G加到4G,但是在使用命令查看的時候只能看到3291M,如下:
- $ free -m
- total used free shared buffers cached
- Mem: 3291 801 2489 0 95 342
- -/+ buffers/cache: 363 2927
- Swap: 1906 0 1906
查了一下才知道,默認32bit的Linux系統只能識別出3291 (3G) 內存,所以如果想在32位的系統上使用大於3G的內存,需要安裝Physical Address Extension (PAE) ,在Ubuntu上的具體步驟如下:
- $ sudo apt-get update
- $ sudo sudo apt-get install linux-headers-server linux-image-server linux-server
- $ sudo reboot
重新啟動系統後,查看內存情況
- $ free -m
- total used free shared buffers cached
- Mem: 3862 3732 129 0 127 1149
- -/+ buffers/cache: 2455 1406
- Swap: 5720 170 5550