56. How do you terminate an ongoing process in Linux?
Answer: Use kill PID or pkill process_name, e.g., kill 1234 or pkill firefox.
57. How do you apply command grouping in Linux?
Answer: Use parentheses, e.g., (cmd1; cmd2) runs commands as a group.
58. How do you set up password aging in Linux?
Answer: Use chage (e.g., chage -M 90 user for 90-day max) or edit /etc/login.defs (e.g., PASS_MAX_DAYS 90).
59. How do you list all processes running in Linux?
Answer: Use ps aux (detailed list), top (real-time), or htop (interactive, color-coded).
60. What is the rsync command, and how do you use it?
Answer: rsync synchronizes files between locations, e.g., rsync -av /source /dest copies with attributes preserved.
61. How do you format a disk in Linux?
Answer: Use mkfs, e.g., mkfs.ext4 /dev/sdb1 after unmounting (umount /dev/sdb1) and identifying the partition (lsblk).
62. How do you change the password for a user account?
Answer: Use passwd username, e.g., passwd john, then enter and confirm the new password.
63. What is the ulimit command, and how do you use it?
Answer: ulimit sets resource limits, e.g., ulimit -u 50 limits a user to 50 processes.
64. What is the find command, and how do you use it?
Answer: find searches for files, e.g., find /path -name "file.txt" locates file.txt in /path.
65. What is the /proc filesystem?
Answer: /proc is a virtual filesystem providing runtime info on system and kernel data (e.g., processes, memory).
66. How do you secure a Linux server?
Answer: Use strong passwords, update software, configure SSH with key authentication, set up firewalls, disable unused services, disable root login, secure SSH brute force attacks with tools like fail2ban, encrypt traffic, and monitor logs.
67. How do you troubleshoot a Linux OS that fails to boot?
Answer: Check boot logs, error messages, GRUB options, hardware, and try an older kernel or recovery mode.
68. What is the init process in Linux?
Answer: init (PID 1) is the first process at boot, initializing the system; modern systems use systemd.
69. What is LVM in Linux?
Answer: LVM (Logical Volume Manager) manages disk space dynamically, supporting resizing, mirroring, and snapshots.
70. What is the /etc/resolv.conf file?
Answer: /etc/resolv.conf configures DNS settings, listing servers and search domains.
71. What is the difference between absolute and relative paths in Linux?
Answer: Absolute paths start from root (e.g., /home/user/file), while relative paths are from the current directory (e.g., ./file).
72. How do you check the status of a service or daemon?
Answer: Use systemctl status service_name, e.g., systemctl status apache2.
73. How do you compress and decompress files in Linux?
Answer: Compress with tar -czvf archive.tar.gz files, decompress with tar -xzvf archive.tar.gz.
74. What is the difference between a process and a daemon?
Answer: A process is any running program (foreground/background); a daemon is a background service running independently, often started at boot.
75. What is the sed command in Linux?
Answer: sed (stream editor) transforms text, e.g., sed 's/old/new/g' file.txt replaces “old” with “new”.
76. What is sudo in Linux?
Answer: sudo (Superuser Do) runs commands with administrative privileges, requiring user authentication.
77. What is umask in Linux?
Answer: umask sets default permission restrictions for new files, e.g., umask 022 removes write for group/others.
78. What is the sudoers file, and how do you configure it?
Answer: /etc/sudoers controls sudo privileges; edit with visudo, e.g., user ALL=(ALL) ALL grants full sudo access.
79. How do you change ownership of a file or directory?
Answer: Use chown, e.g., chown user:group file.
80. How do you recursively copy files and directories?
Answer: Use cp -R source dest, e.g., cp -R /src /dst.
81. How do you set up a static IP address in Linux?
Answer: Edit /etc/network/interfaces, e.g., iface eth0 inet static address 192.168.1.100, then restart networking.
82. How do you copy a file to multiple directories?
Answer: Use a loop or xargs, e.g., echo dir1 dir2 | xargs -n 1 cp file.
83. How do you find the IP address of a Linux system?
Answer: Use ip addr show or ifconfig to display network interface details.
84. How do you check system logs in Linux?
Answer: View logs in /var/log, e.g., tail /var/log/syslog or less /var/log/messages.
85. How do you troubleshoot a slow-performing Linux server?
Answer: Use top/htop for resource usage, check disk I/O, network traffic, and logs for bottlenecks.
86. How do you identify and terminate a CPU-intensive process?
Answer: Use top to find the PID, then kill PID, e.g., kill 1234.
87. What is the route command in Linux?
Answer: route manages the IP routing table, e.g., route -n shows routes.
88. How do you configure a Linux system as a router?
Answer: Enable IP forwarding (echo 1 > /proc/sys/net/ipv4/ip_forward), configure interfaces, and set routing rules.