Mohammedz.com

For Linux and Shell scripting.

Linux OS

Here are some Linux Operating System related interview questions. I would be adding more into the list and of course the answers soon.

    1. Linux Boot Process
      1. Explain the Linux Boot Process
      1. Which is the first user process?
      1. Which is the process with PID 0?
      1. System startup? BIOS? Power On Self Test (POST)?
    1. What is Init process? Functions of init process?
    1. What is initrd? Is it possible to boot the system without initrd?
    1. How to create a initrd file?
    1. What happens when /sbin/init is corrupted? Or doesn’t exist?
    1. Process states
      1. What are the different process states?
      1. Interruptible sleep vs Uninterruptible sleep
    1. Process priority
      1. What is the highest priority for a process? What is the lowest priority for a process?
      1. What is the NICE value?
      1. What is the difference between NICE value and PRIORITY value fields in top command output?
    1. Zombie process vs Orphan process
      1. What is a zombie process? How to kill a zombie process?
      1. What is an orphan process? Does an orphan process becomes zombie?
      2. If you have thousands of zombie processes, will that affect the system performance?
      3. How to create a sample zombie process?
    1. Daemon vs Process
      1. What is a daemon?
      2. What are the differences between a daemon and a process in Linux/Unix?
      1. How to create a daemon?
    1. SIGTERM signal vs SIGKILL signal
      1. What are the differences between SIGTERM signal and SIGKILL signal?
      2. Which is the default signal sent to processes when you use kill command?
      3. What does “kill -9” means? How it is different from regular kill command?
      4. What happens when you kill init (process ID 1)?
      1. If you send SIGKILL to a parent process who has some child processes in zombie state, will that help to get rid of zombie processes?
    1. Load Average
      1. What is load average?
      1. How does the load average is calculated?
      1. What can be considered as a good load average value?
    1. Troubleshooting Load Average issues
      1. The server is slow. How would you troubleshoot it?
      1. How do you handle the situation without killing any process?
    1. Single user mode
      1. What is single user mode in Linux?
      1. What is single user mode used for?
      2. How can we login to single user mode?
      3. If you forgot the root password, how can you reset it?
    1. SSH Keys
      1. How to configure key-based authentication for SSH?
      2. Is it possible to recreate a lost SSH key (private key / public key)?
    1. Netcat (nc command)
      1. Is it possible to open specific ports without running any services them?
      1. How can I have the system listen on a port without running the actual service/program associated with it?
      1. There is a change scheduled which requires a specific port accessible from world wide. How can you verify that the port is accessible from outside your network before running the actual program/service on the server?
    1. Argument list too long
      1. Error: Argument list too long. What does that error mean?
      1. What is the maximum limit for number of arguments that can be passed to a script or program?
      1. What is the solution for “Error: Argument too long” situations?
      1. What is the difference between exec and xargs?
    1. How does xargs work?
    1. How do you delete thousands of files inside a directory?
    1. List Open Files (lsof command)
      1. How to list all open files in the system?
      2. How do you determine what process has a particular file open?
      1. Where does the lsof get data from?
    1. Memory (RAM –  Random Access Memory)
      1. How to find memory details in a system?
      2. Explain each fields in the “Free” command output.
      3. What is the difference between buffers and caches?
      4. When you do something like “find / -type f”, does that increases the cache or buffer?
      1. How to find the actual free memory (RAM) in the system?
      2. Different memory fields in ps command and top command outputs (RSS and SVZ).
      3. How to find processes with more memory usages?
      1. Linux memory allocation details.
      1. Difference between 32bit and 64bit architectures?
      2. Does the Linux system allocate entire requested memory initially?
      3. What is virtual memory?
      4. Is swap memory included in virtual memory?
    1. Init Process
      1. What is init?
      2. Can you kill init with kill command?
    1. Runlevels
      1. How to find the current runlevel on your Linux system?
      2. Where does the system get this information from?
    1. Umask
      1. What is the default permission for files and directories?
      2. How to change the default permission for files and directories?
      3. How to change default umask value?
    1. Fork () and Exec () system calls
      1. Which system call creates a process in Linux?
      2. What does fork() system call do? What does exec system call do?
      1. What does fork() returns?
    1. PROC file system (pseudo file system)
      1. What is /proc filesystem?
      1. Where you can find system tunable parameters?
      1. Name a few tunable system parameters.
      1. How to make the changes persistent?
    1. When you make changes with “sysctl -w” will that add entry to sysctl.conf? Do you have to restart the system to make changes into effect?
    1. Systat package for system resource monitoring (vmstat, iostat, sar)
      1. vmstat
      1. iostat
      1. sar
      1. mpstat
    1. iotop
    1. Sticky Bit, Setuid
    2. /etc/skel/ directory (default files and directories to be copied to newly created users’ home directory)
    3. How to remove a file using its inode number?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s