1. How do you check system performance?
Use multiple tools depending on need:
top
htop
uptime
vmstat 1
iostat -x 1
free -m
sar -u 1 5
👉 Real-time: CPU bottleneck → check top & vmstat
2. How do you find high CPU consuming process?
top
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head
Kill process:
kill -9
3. How do you check memory usage?
free -m
cat /proc/meminfo
top
4. Difference between soft link & hard link?
ln file1 hardlink
ln -s file1 softlink
Hard link → same inode
Soft link → pointer (like shortcut)
5. How do you find large files?
find / -type f -size +100M
du -ah / | sort -rh | head -20
6. How do you monitor logs in real-time?
tail -f /var/log/messages
tail -f /var/log/syslog
7. What is inode?
Check inode:
ls -i
df -i
👉 Stores metadata of file
8. How do you manage disk space?
df -h
du -sh *
Clean:
rm -rf unwanted_files
9. How do you check open ports?
netstat -tulnp
ss -tulnp
10. How do you check running services?
systemctl status nginx
systemctl list-units --type=service
11. How do you restart a service?
systemctl restart nginx
12. What is cron job? How to schedule?
crontab -e
Example:
0 2 * * * /backup.sh
13. How do you find file by name?
find / -name file.txt
locate file.txt
14. How do you check disk I/O?
iostat -x 1
iotop
15. What is load average?
uptime
👉 Load > CPU cores → system overloaded
16. How do you change permissions?
chmod 755 file
chmod +x script.sh
17. How do you change ownership?
chown user:group file
18. How do you troubleshoot server down issue?
Step-by-step:
Check server access:
ping
ssh user@ip
Check CPU/memory:
top
free -m
Check disk:
df -h
Check logs:
tail -f /var/log/messages
19. How do you check network connectivity?
ping google.com
traceroute google.com
curl -I http://example.com
20. What is grep? Give example
grep "error" file.log
grep -i "failed" file.log
grep -r "password" /etc
21. How do you compress files?
tar -cvf file.tar dir/
tar -xvf file.tar
gzip file
gunzip file.gz
22. What is process management?
ps -ef
kill
nice
renice
23. What is swap memory?
Check:
swapon -s
free -m
24. Difference between TCP & UDP?
TCP → reliable
UDP → fast but no guarantee
25. How do you check OS version?
cat /etc/os-release
uname -a
💥 Real-Time Scenario Questions
🔹 Scenario 1: Disk full
df -h
du -sh *
find / -size +500M
🔹 Scenario 2: Server slow
top
vmstat
iostat
🔹 Scenario 3: Service not starting
systemctl status nginx
journalctl -xe
🔹 Scenario 4: Port not accessible
netstat -tulnp
ss -tulnp
firewall-cmd --list-all
⚡
Linux Interview Questions: ==================== 1).Have you done any kind of automations into linux os ? 2).How much rate on yourself into linux os ? 3).How to extend the volume group into linux os ? 4).how to check the logical volume and hoe to check t check volume group into linux os ? 5).u know the booting sequences into linux os ? 6).so what we do into the grub into linux os ? 7).have you used find command into linux os ? 8).differnece between find and grep command into linux os ? 9).have to find the files which is modified by 7 days ago .so how to u are going to end used into find command into linux os ? 10).if you want to find all these logs fils and compressed Ito linux os ? 111)..which you find the how much file size is it ? 12).can u find a file which auger then 100mb? 13)How to list out the open files which is finished into the PID into linux os ? 14).what are all the things I have to done into linux os ? 1======= How to good at database side into linux os ? Have you logg...
Comments
Post a Comment