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
AWS Interview Questions:
1).could you please explain the spot instances and configuring about the spot ec2 instances into aws environment ? 2).what is the mfa and how to configure the mfa into iam ? 3).security groups and tell about it the concepts 4).vpc endpoints and how to configure the those things ? 5).vpc flow logs 6).AWS CLI into aws environment? ------------------------------------------------ AWS Interview Questions: 1).IAM roles into aws environment: 2).Custom IAM role and policy into aws environment? IAM Role : which is used to establish the communication between the different iam services into aws environment IAM policy into aws environment: which is use to tell us what kind of activity you can perform on each services into aws environments: maybe it would be like as the, read ,write and execute How to create IAM role and policy into aws environment? first create the iam role without allocated the policy: give the aws services choose use case or aws services then don't choose any policy ...
Comments
Post a Comment