Interview Q&A / Linux & Shell

INTERVIEW Q&A · 63 QUESTIONS

Linux & Shell interview questions

Permissions, processes, pipes and the commands you are expected to know cold.

  1. How do you check disk space and memory usage on a Linux server?

    Use df -h to see free space on each mounted file system, du -sh to see how much space a folder takes, and free -h to see RAM and swap. In free, look at the "available" column, not "free", because Linux uses spare RAM as disk cache and gives it back when programs need it.

    IntermediateIn-depth3 min read
  2. What is the difference between a hard link and a soft link in Linux?

    A hard link is another name for the same file on disk (the same inode), so the data stays as long as any name exists. A soft (symbolic) link is a small separate file that stores a path to the target; it breaks if the target is moved or deleted, but it can point to directories and across file systems.

    IntermediateIn-depth3 min read