linux interview questions:
=========================
Critical Linux Interview Questions (Experienced)
🧠 1. Troubleshooting Scenarios (MOST IMPORTANT)
👉 Q1: Server is slow. How will you troubleshoot?
Expected Approach:
Check CPU:
top / htop
Check Memory:
free -m
Check Disk:
df -h
du -sh /*
Check processes:
ps -ef --sort=-%cpu
Check I/O:
iostat
👉 Q2: Disk is full. What will you do?
Answer:
df -h
du -sh /* | sort -hr
Clean logs:
/var/log
Remove old files
Use logrotate
👉 Q3: System not booting. How to recover?
Answer:
Boot into rescue mode / single-user mode
Fix:
/etc/fstab
GRUB issues
Reinstall bootloader:
grub2-install
👉 Q4: Service is not starting. What to check?
systemctl status
journalctl -xe
Check config files
Check port conflicts:
netstat -tulnp
👉 Q5: High CPU usage. How to fix?
top
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu
Kill process:
kill -9
⚙️ 2. Process & Resource Management
👉 Q6: Difference between nice and renice?
nice: start process with priority
renice: change running process priority
👉 Q7: Zombie process – what is it?
Process completed but entry still in process table
Fix: kill parent process
👉 Q8: How to monitor memory leaks?
top, htop
ps aux --sort=-%mem
smem
🌐 3. Networking
👉 Q9: How to check open ports?
ss -tulnp
netstat -tulnp
👉 Q10: Server not reachable. What steps?
Ping
Check IP:
ip a
Check routes:
ip route
Firewall:
firewall-cmd --list-all
👉 Q11: Difference between TCP and UDP?
TCP: reliable
UDP: faster, no guarantee
🔐 4. Security
👉 Q12: How to secure Linux server?
Disable root login
Use SSH keys
Configure firewall
Regular patching
👉 Q13: What is SELinux?
Security layer
Modes:
Enforcing
Permissive
Disabled
Check:
getenforce
👉 Q14: How to check failed login attempts?
/var/log/secure
last
💾 5. Storage & File Systems
👉 Q15: Difference between soft link and hard link?
Soft: shortcut
Hard: actual inode
👉 Q16: How to extend LVM?
lvextend -L +10G /dev/mapper/vg-lv
resize2fs /dev/mapper/vg-lv
👉 Q17: What is inode?
Metadata of file
Stores permissions, owner
⚡ 6. Performance & Monitoring
👉 Q18: How to monitor system performance?
top, vmstat, iostat, sar
👉 Q19: Load average meaning?
Number of processes waiting for CPU
🔄 7. Services & Boot
👉 Q20: Difference between systemctl and service?
systemctl: systemd
service: older init
👉 Q21: Runlevels vs Targets?
Runlevels → old
Targets → systemd
🧩 8. Real DevOps Scenarios
👉 Q22: Log file growing fast. What to do?
Use logrotate
Compress old logs
👉 Q23: Application port conflict issue?
lsof -i :8080
kill -9
👉 Q24: Cron job not running. Debug?
Check:
crontab -l
systemctl status cron
Check logs
🚀 Interview Killer Questions
👉 Q25: Difference between fork() and exec()?
fork: creates process
exec: replaces process
👉 Q26: What happens when you type a command?
Flow:
Shell → PATH → Binary → Kernel → Execution
HSBC Bank: Name : Srikanth Patil Mobile : 9513273723 Email Id : Srikanth.patil@hsbc.co.in How to check payslips : Go to the portal: here we can see the link: https://infinite.greyhr.com/login.do Quick links : GreytHR ---------------------------------------------------- Medical and group insurance : Contact : shafi +91 -7022557573 email address: mediclaimhelpdesk@infinite.com For any escalation write to : MYHR@infinite.com Quicklink -BIZX: https://bizx.inifinite.com --------------------------------------------------------- Axis Bank : Name : Ragini sharma Mobile Number: 8088982659 mail address: Ragini.sharma@axisbank.com --------------------------------------------------------- Name : Archishman Mobile number: 7678068570 mail address: Archishman.Deb@axisbank.com -------------------------------------------------------- Hdfc Bank : Name : Pavan katariya Mobile Number: 9986349366 Mail address: pavan.katariya@hdfcbank.com ----------------...
Comments
Post a Comment