Interview
Hiển thị các bài đăng có nhãn Interview. Hiển thị tất cả bài đăng

Linux Real-Time Interview Questions (Advanced)


In real Linux/DevOps interviews, you are NOT judged by

how many commands you remember…

You are judged by how you THINK during production issues.

This poster covers real-world scenarios like:

• High load but CPU idle

• Disk space not freeing

• Zombie processes

• OOM killer issues

• Cron & network failures

💡 Interview Tip:

Linux file system related questions and answers

1. What is an inode in Linux?

-An inode (index node) is a data structure that stores metadata about a file  such as file size, permissions, ownership, timestamps, and disk block locations — but not the file name or its path.

- Each file has one unique inode, and file names are stored in directory entries that map names to inode numbers.

#ls -i filename (Example command)

Shows the inode number of a file.

2. How can you check disk space usage on a Linux system?

- df -h (You can use this commands)

-Displays disk space usage for all mounted file systems in human-readable form.

du -sh /path/to/dir

- Shows total disk usage of a directory.

- Real-time tip: Use du -h --max-depth=1 to find which directories consume the most space.

3. What happens when a file is deleted in Linux while a process is still using it?

 - The file’s directory entry is removed, but the data remains on disk until the process releases the file descriptor.

- You can identify such files using:

lsof | grep deleted

- If you need to reclaim space