LFCS Certification Kernel Parameter Modification 5 — Questions and Answers
Question 1: What is the maximum value for 'kernel.pid_max' on a 64-bit Linux system?
- 4194304 (Correct answer)
- 65536
- 32768
- 2147483647
Correct answer: 4194304
On 64-bit systems, kernel.pid_max can be set up to 4,194,304 (2^22), allowing more simultaneous processes.
Question 2: An LFCS candidate needs to harden a server by disabling ICMP redirects. Which sysctl key should be set to 0?
- net.ipv4.conf.all.accept_redirects (Correct answer)
- net.ipv4.icmp.redirects
- net.core.icmp_enable
- kernel.icmp_redirect
Correct answer: net.ipv4.conf.all.accept_redirects
Setting net.ipv4.conf.all.accept_redirects=0 prevents the kernel from accepting ICMP redirect messages that could alter routing.
Question 3: Which sysctl parameter, when set to 1, enables the kernel's Magic SysRq key functionality?
- kernel.sysrq (Correct answer)
- kernel.magic_key
- kernel.sysrq_enable
- kernel.debug_key
Correct answer: kernel.sysrq
kernel.sysrq controls Magic SysRq; setting it to 1 enables all SysRq functions for low-level system control.
Question 4: A process is being killed by the OOM killer. Which sysctl parameter controls the minimum amount of free memory the kernel keeps reserved?
- vm.min_free_kbytes (Correct answer)
- vm.oom_reserve
- kernel.oom_threshold
- vm.overcommit_ratio
Correct answer: vm.min_free_kbytes
vm.min_free_kbytes sets the minimum kilobytes of free memory the kernel attempts to keep available at all times.
Question 5: What does 'net.core.somaxconn' control?
- The maximum length of the listen backlog queue for sockets (Correct answer)
- The maximum number of network sockets per process
- The maximum socket buffer size in bytes
- The maximum number of simultaneous network connections system-wide
Correct answer: The maximum length of the listen backlog queue for sockets
net.core.somaxconn caps the maximum value for the listen() backlog argument, limiting queued connection requests per socket.
Question 6: Which command would an admin use to search for all sysctl parameters related to 'ipv6'?
- sysctl -a | grep ipv6 (Correct answer)
- sysctl --search ipv6
- sysctl -f ipv6
- sysctl -r ipv6
Correct answer: sysctl -a | grep ipv6
Piping 'sysctl -a' output through grep is the standard way to filter kernel parameters by keyword.
Question 7: What is the correct permissions mode for a file placed in /etc/sysctl.d/ so that sysctl --system processes it securely?
- 644 (Correct answer)
- 755
- 600
- 777
Correct answer: 644
Mode 644 (rw-r--r--) is appropriate: root can write, and all users can read, which sysctl requires to parse the file.
What is the maximum value for 'kernel.pid_max' on a 64-bit Linux system?