Linux Interview Questions for experienced
Advanced Linux Interview Questions (with Practical Focus) ๐ง 1. What happens when you type a command in Linux? Flow: Shell receives command Checks PATH variable Finds binary (/bin, /usr/bin) Forks process Executes via exec() ⚙️ 2. How do you check CPU, Memory, and Disk usage? top htop free -m vmstat iostat df -h du -sh * ๐ Real-time: “If server is slow → first check top and iostat” ๐ 3. How do you find which process is using high CPU? top ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head Kill process: kill -9 ๐ 4. Difference between soft link and hard link? Feature Soft Link Hard Link Command ln -s ln Inode Different Same Works across FS Yes No If original deleted Broken Still works ๐ 5. File permissions (very important) chmod 755 file chown user:group file ๐ 755 = rwxr-xr-x ๐ฅ 6. What is inode? Stores metadata of file (size, owner, permissions) Does NOT store filename Check: ls -i df -i ๐งช 7. What will you do if disk is full? df -h du -sh /* find / -size +100M ๐ Clear logs: tru...