Processes
Example /proc Output
sysadmin@localhost:~$ ls /proc
1 128 17 21 23 39 60 72 cpuinfo modules meminfo ...
- Directories with numbers = active processes
- Files like
cpuinfo, modules, meminfo = kernel/system info
Modifying Kernel Behavior
/proc/sys contains files that can be modified by root to change kernel behavior.
- Changes made directly are temporary; permanent changes require
/etc/sysctl.conf.
- Example: Disable ping (ICMP echo) responses:
# Check current ICMP echo response setting
cat /proc/sys/net/ipv4/icmp_echo_ignore_all
0
# Ping localhost works
ping -c1 localhost
# 1 packets transmitted, 1 received
# Disable ping responses
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
# Ping localhost fails
ping -c1 localhost
# 1 packets transmitted, 0 received