How can the kernel parameter for the maximum size of the shared memory segment (shmmax) be changed to 2GB (2147483648 Bytes) on a running system? (Choose TWO correct answers.)



A. Edit /etc/shmmax and set the parameter to 2147483648.
B. sysctl shmmax=2147483648
C. sysctl kernel.shmmax=2147483648
D. echo 2147483648 > /proc/sys/kernel/shmmax
E. export kernel.shmmax=2147483648

題解

「sysctl」指令可以在系統運作期間調整系統核心參數。若要改變共享記憶體區段的大小,需改變「kernel.shmmax」的設定值。「kernel.shmmax」在「/proc/sys」下對應的路徑就是「/proc/sys/kernel/shmmax」。

因此這題答案是選項「C」和選項「D」。