/ Career Advice

11 Linux Interview Questions and Answers

11 Linux Interview Questions and Answers

Interviews can be nerve-wracking, but the best way to calm your nerves is to practice with potential interview questions.

It's impossible to know exactly what you'll be asked during your interview, but you're likely to face a variety of questions, ranging from relatively simple to complex. If you don't know the answer to a question, don't panic. Instead, be honest about what you don't know and discuss how you'd go about finding the answer.

Engineers and developers often face problems they don't immediately know the answer to, so demonstrating that you're not thrown off by knowledge gaps is also key to a successful interview.

That said, here are some Linux interview questions you're likely to face and their answers.

1. What is Linux?

Here, the interviewer is looking for an overview of what you know about Linux. Note that Linux is an open-source operating system developed by Linus Torvolds. Some other points to consider mentioning include:

  • Security, including authentication features and file system access control
  • Multiprogramming system
  • Application support
  • Customizable keywords

2. What is the Linux kernel?

The Linux kernel is the foundation of the Linux OS. It communicates between the computer's hardware and software and manages hardware resources for users. It's the first program that loads when a computer system starts.

3. What is LILO?

LILO stands for Linux Loader, and it's a boot loader for the Linux operating system. It can function as a master or secondary boot program and performs functions like locating and starting the kernel.

4. What are process states in Linux?

A process is running a program. Linux process states include:

  • New/Ready. This means a process is ready to run.
  • Running. This means a process is being executed.
  • Blocked or waiting. This means a process is waiting for input or a system resource.
  • Terminated or completed. This means a process has either been completed or terminated by the OS.
  • Zombie. This means a process has been halted, but information about the process is still available in the process table.

5. What are the differences between Linux and UNIX?

There are several differences between Linux and UNIX, but the most important may be that Linux is open source while UNIX is proprietary. Linux is also used by many users, from home users and hobbyists to developers and businesses. UNIX is primarily designed for mainframes, servers, and workstations.

6. What is a Linux shell?

A Linux shell is what allows users to execute commands. It's a command-line interface but significantly more powerful than the command line you find in Windows. BASH, or Bourne Again Shell, is the most widely used Linux shell. Other shells include:

  • CSH
  • KSH
  • TCSH
  • Bourne shell
  • ZSH

7. What is swap space in Linux?

Swap space is what Linux uses when the RAM is full. If the system needs more memory, inactive pages are moved to the swap space. It helps with relatively small overages, but it's not a substitute for additional RAM.

8. What are the different types of file permissions in Linux?

There are three types of owners in Linux systems: user, group, and others. Owners can have three types of permissions:

  • Read, which allows the user to open and read the file but not modify or run it.
  • Write, which allows the user to open and modify the file but not execute it.
  • Execute, which allows the user to execute the file.

9. What is a daemon?

Daemons work in the background. They're utility programs that monitor subsystems to ensure the operating system runs properly. They start when the system starts and terminate when the system shuts down.

10. What's the difference between cron and anacron?

Cron and anacron both run jobs at scheduled times. Cron runs jobs at certain intervals if the computer is running, while anacron runs the job even if the computer is off. Cron is also a daemon, while anacron is not.

A cron is best for continuously running systems, like servers, while an anacron is best for systems that are regularly shut down, like workstations.

11. What is a zombie process?

A zombie process is a process that's finished but hasn't exited. This typically happens when a child function has finished, but its parent function hasn't received and acknowledged the message. Once the parent process recognizes it, it's removed from the process table.

Practicing the questions above will help you feel more confident if you face any Linux-related questions during your interview. But, you'll also want to prepare for technical interviews. Technical interviews may involve debugging code, building a small project, or explaining how you would design a solution to a technical problem.

To learn more about technical interviews and how to prepare for them, visit our Career Center.


Interview Prep Courses & Tutorials | Codecademy
Interviewing is an important step in your journey towards landing a job in tech. Technical interviews let you showcase your skills and knowledge, but practice is key. You’ll need to understand technical concepts and be prepared to talk through solutions with your interviewers.

Get more practice, more projects, and more guidance.

11 Linux Interview Questions and Answers
Share this