{"id":111555,"date":"2026-05-26T11:45:07","date_gmt":"2026-05-26T06:15:07","guid":{"rendered":"https:\/\/www.guvi.in\/blog\/?p=111555"},"modified":"2026-09-24T21:29:29","modified_gmt":"2026-09-24T15:59:29","slug":"linux-interview-questions-and-answers","status":"publish","type":"post","link":"https:\/\/www.guvi.in\/blog\/linux-interview-questions-and-answers\/","title":{"rendered":"Linux Interview Questions and Answers (2026): Fresher to Expert Level"},"content":{"rendered":"\n<p>Most candidates walk into a Linux interview having memorized a handful of commands, only to be asked why a server is running slow or what happens when a process refuses to die. Even after going through dozens of Linux interview questions and answers, that gap between what you studied and what they actually ask is where confidence slips.<\/p>\n\n\n\n<p>The good part is that Linux rewards people who understand how things work, not those who recite syntax. Once that clicks, even the tricky questions start to feel familiar.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>TL;DR Summary<\/strong><\/h2>\n\n\n\n<ul>\n<li>Linux interview questions and answers in this guide are organized into three levels: beginner, intermediate, and advanced.<\/li>\n\n\n\n<li>Interviewers look for concept clarity, command knowledge, practical thinking, and confidence under pressure.<\/li>\n\n\n\n<li>Beginner topics include the kernel, shell, file permissions, chmod, and basic commands like cp, mv, and rm.<\/li>\n\n\n\n<li>Intermediate and advanced topics cover processes, links, inodes, cron, networking, SELinux, systemctl, and SSH troubleshooting.<\/li>\n\n\n\n<li>A quick command reference table and practical tips help you revise faster and prepare for scenario-based questions.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"background-color: #099f4e; border: 3px solid #110053; border-radius: 12px; padding: 18px 22px; color: #FFFFFF; font-size: 18px; font-family: Montserrat, Helvetica, sans-serif; line-height: 1.6; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); max-width: 750px; margin: 22px auto;\">\n  <h4 style=\"margin-top: 0; font-size: 22px; font-weight: 700; color: #ffffff;\">\ud83d\udca1 Did You Know?<\/h4>\n  <ul style=\"padding-left: 20px; margin: 10px 0;\">\n    <li>Linux powers over 96 percent of the world&#8217;s top one million web servers as of 2026, making it the dominant server operating system on the planet.<\/li>\n    <li>The Linux kernel had over 27 million lines of code as of 2024, contributed by thousands of developers from companies including Google, Intel, Red Hat, and Meta.<\/li>\n    <li>Android, which runs on over 3 billion devices worldwide, is built on the Linux kernel, making Linux the most widely deployed operating system in history.<\/li>\n    <li>The top command in Linux was created in 1984 by William LeFebvre and has been a staple of system monitoring for over 40 years.<\/li>\n  <\/ul>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What Interviewers Actually Look For<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"630\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/What-Interviewers-Actually-Look-For-1200x630.webp\" alt=\"what interviewers actually look for\" class=\"wp-image-120637\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/What-Interviewers-Actually-Look-For-1200x630.webp 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/What-Interviewers-Actually-Look-For-300x158.webp 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/What-Interviewers-Actually-Look-For-768x403.webp 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/What-Interviewers-Actually-Look-For-1536x806.webp 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/What-Interviewers-Actually-Look-For-2048x1075.webp 2048w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/What-Interviewers-Actually-Look-For-150x79.webp 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<p>Before diving into the Linux interview questions and answers, understand what interviewers want to see:<\/p>\n\n\n\n<ul>\n<li><strong>Concept clarity:<\/strong> Can you explain what something is in simple words?<\/li>\n\n\n\n<li><strong>Command knowledge:<\/strong> Do you know the right command for the right task?<\/li>\n\n\n\n<li><strong>Practical thinking:<\/strong> Can you apply knowledge to solve a real system problem?<\/li>\n\n\n\n<li><strong>Confidence under pressure:<\/strong> Do you know your basics cold, or do you fumble?<\/li>\n<\/ul>\n\n\n\n<p>The best way to use this guide is to read each question, cover the answer, and try to recall it yourself. That active recall builds the memory that holds up in an actual interview.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong><em>Ready to stop repeating tasks by hand and start automating them? Join 2,000+ learners in the <\/em><\/strong><em><a href=\"https:\/\/www.guvi.in\/courses\/software-testing-and-automation\/introduction-to-linux-shell-scripting-with-bash\/?utm_source=blog&amp;utm_medium=hyperlink&amp;utm_campaign=linux-interview-questions-and-answers\" target=\"_blank\" rel=\"noreferrer noopener\">Introduction to Linux Shell Scripting Course<\/a><\/em><strong><em>. Learn Bash through 13 hours of self-paced, hands-on lessons across 4 modules and earn a certificate. Enroll today and turn everyday tasks into scripts that work for you!<\/em><\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Level 1: Beginner Linux Interview Questions and Answers<\/strong><\/h2>\n\n\n\n<p>These are guaranteed to be asked in every fresher and entry-level interview. Know all of these by heart.<\/p>\n\n\n\n<p><strong>1. What is Linux?<\/strong><\/p>\n\n\n\n<p>Linux is a free, open-source <a href=\"https:\/\/www.guvi.in\/blog\/introduction-to-operating-systems\/\" target=\"_blank\" rel=\"noreferrer noopener\">operating system<\/a> kernel based on Unix architecture. It manages hardware resources and allows software to communicate with hardware. It is widely used in servers, mobile devices, embedded systems, and cloud infrastructure worldwide.<\/p>\n\n\n\n<p><strong>2. What is the Linux kernel?<\/strong><\/p>\n\n\n\n<p>The kernel is the core of the Linux operating system. It bridges hardware and software, managing the CPU, memory, devices, and system calls. Everything else in the OS sits on top of the kernel.<\/p>\n\n\n\n<p><strong>3. What is the difference between Linux and Unix?<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Unix\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Unix<\/a> is a proprietary operating system developed at Bell Labs in the 1970s. Linux is a free, open-source reimplementation inspired by Unix. Linux is more widely used today and supports far more hardware platforms than Unix.<\/p>\n\n\n\n<p><strong>4. What is BASH?<\/strong><\/p>\n\n\n\n<p>BASH stands for Bourne Again Shell. It is the default command-line interpreter on most Linux distributions. It processes user commands, runs scripts, and automates tasks. Brian Fox wrote it for the GNU project.<\/p>\n\n\n\n<p><strong>5. What is a shell in Linux?<\/strong><\/p>\n\n\n\n<p>A <a href=\"https:\/\/www.guvi.in\/blog\/what-are-shell-scripts\/\" target=\"_blank\" rel=\"noreferrer noopener\">shell<\/a> is a command-line interface that lets users interact with the operating system by typing commands. It takes user input, passes it to the kernel for execution, and returns the output. Common shells include BASH, ZSH, and KSH.<\/p>\n\n\n\n<p><strong>6. What are the basic components of Linux?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Component<\/strong><\/td><td><strong>Role<\/strong><\/td><\/tr><tr><td>Kernel<\/td><td>Core, manages hardware<\/td><\/tr><tr><td>Shell<\/td><td>Interface between user and kernel<\/td><\/tr><tr><td>File System<\/td><td>Organizes how data is stored<\/td><\/tr><tr><td>System Libraries<\/td><td>Functions used by applications<\/td><\/tr><tr><td>System Utilities<\/td><td>Basic tools like ls, cp, mv<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>7. What is the root directory in Linux?<\/strong><\/p>\n\n\n\n<p>The root directory is represented by a single forward slash \/. It is the top-level directory of the entire Linux file system. All other directories, files, and mount points exist under the root directory.<\/p>\n\n\n\n<p><strong>8. What is the difference between absolute path and relative path?<\/strong><\/p>\n\n\n\n<p>An absolute path starts from the root directory and gives the full location of a file, like \/home\/user\/documents\/file.txt. A relative path starts from the current directory, like documents\/file.txt. Absolute paths work from anywhere. Relative paths depend on where you currently are.<\/p>\n\n\n\n<p><strong>9. What does the pwd command do?<\/strong><\/p>\n\n\n\n<p>pwd stands for Print Working Directory. It displays the full absolute path of the directory you are currently in. It is the fastest way to confirm your location in the file system.<\/p>\n\n\n\n<p><strong>10. What is the difference between the commands ls, ls -l, and ls -a?<\/strong><\/p>\n\n\n\n<ul>\n<li><strong>ls<\/strong> lists all visible files and folders in the current directory<\/li>\n\n\n\n<li><strong>ls -l<\/strong> shows a detailed long listing with permissions, owner, size, and date<\/li>\n\n\n\n<li><strong>ls -a<\/strong> shows all files including hidden files that start with a dot<\/li>\n<\/ul>\n\n\n\n<p><strong>11. What are file permissions in Linux?<\/strong><\/p>\n\n\n\n<p>Every file and directory in Linux has three permission types: read (r), write (w), and execute (x). These are assigned to three categories: owner, group, and others. Permissions control who can read, modify, or run a file.<\/p>\n\n\n\n<p><strong>12. How do you read the permission string -rwxr-xr&#8211;?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Part<\/strong><\/td><td><strong>Meaning<\/strong><\/td><\/tr><tr><td>&#8211;<\/td><td>Regular file (d = directory)<\/td><\/tr><tr><td>rwx<\/td><td>Owner has read, write, execute<\/td><\/tr><tr><td>r-x<\/td><td>Group has read and execute only<\/td><\/tr><tr><td>r&#8211;<\/td><td>Others have read only<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>13. What does the chmod command do?<\/strong><\/p>\n\n\n\n<p>chmod stands for change mode. It changes a file&#8217;s or directory&#8217;s permissions. You can use symbolic mode like chmod u+x file.txt to add execute for the owner, or numeric mode like chmod 755 file.txt to set all permissions at once.<\/p>\n\n\n\n<p><strong>14. What does chmod 755 mean?<\/strong><\/p>\n\n\n\n<p>755 breaks down as: owner gets 7 (read+write+execute), group gets 5 (read+execute), others get 5 (read+execute). Each digit is a sum of read=4, write=2, execute=1. 755 is the most common permission for public executables and directories.<\/p>\n\n\n\n<p><strong>15. What is the difference between cp, mv, and rm?<\/strong><\/p>\n\n\n\n<ul>\n<li><strong>cp<\/strong> copies a file from one location to another; the original stays<\/li>\n\n\n\n<li><strong>mv<\/strong> moves a file to a new location or renames it; the original is removed<\/li>\n\n\n\n<li><strong>rm<\/strong> permanently deletes a file with no recycle bin<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Level 2: Intermediate Linux Interview Questions and Answers<\/strong><\/h2>\n\n\n\n<p>These Linux interview questions and answers test your hands-on knowledge of processes, users, networking, and the <a href=\"https:\/\/www.guvi.in\/blog\/the-linux-filesystem\/\" target=\"_blank\" rel=\"noreferrer noopener\">file system<\/a>.<\/p>\n\n\n\n<p><strong>16. What is a process in Linux?<\/strong><\/p>\n\n\n\n<p>A process is any running instance of a program in Linux. Every process has a unique PID (Process ID). Linux manages processes by allocating CPU time, memory, and resources to each one through the kernel&#8217;s process scheduler.<\/p>\n\n\n\n<p><strong>17. What is the difference between a foreground and background process?<\/strong><\/p>\n\n\n\n<p>A foreground process runs directly in the terminal and blocks it until completion. A background process runs independently behind the terminal, freeing it for other commands. You can move a process to the background by adding &amp; at the end of the command.<\/p>\n\n\n\n<p><strong>18. What does the ps command do?<\/strong><\/p>\n\n\n\n<p>ps stands for process status. It displays a snapshot of currently running processes. ps aux shows all processes from all users with full details, including PID, CPU usage, memory usage, and the command that started the process.<\/p>\n\n\n\n<p><strong>19. What is the difference between ps and top?<\/strong><\/p>\n\n\n\n<p>ps gives a one-time static snapshot of running processes. top gives a live, continuously updating view of all processes sorted by CPU or memory usage. top is the go-to tool for real-time system monitoring in Linux interviews and real work.<\/p>\n\n\n\n<p><strong>20. How do you kill a process in Linux?<\/strong><\/p>\n\n\n\n<p>Use the kill command followed by the PID. kill 1234 sends the default SIGTERM signal asking the process to terminate gracefully. kill -9 1234 sends SIGKILL, which forces immediate termination with no cleanup. Always try SIGTERM before SIGKILL.<\/p>\n\n\n\n<p><strong>21. What is the difference between hard link and soft link?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Feature<\/strong><\/td><td><strong>Hard Link<\/strong><\/td><td><strong>Soft Link (Symbolic Link)<\/strong><\/td><\/tr><tr><td>Points to<\/td><td>Inode directly<\/td><td>File path<\/td><\/tr><tr><td>Works across file systems<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>Original deleted<\/td><td>Link still works<\/td><td>Link breaks<\/td><\/tr><tr><td>Created with<\/td><td>ln file link<\/td><td>ln -s file link<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>22. What is an inode in Linux?<\/strong><\/p>\n\n\n\n<p>An inode is a data structure that stores file metadata: permissions, owner, size, timestamps, and disk block locations. It does not store the filename. The directory entry maps the filename to the inode number. Every file and directory has exactly one inode.<\/p>\n\n\n\n<p><strong>23. What is the grep command used for?<\/strong><\/p>\n\n\n\n<p>grep searches for a specific pattern or text string inside files and prints matching lines. grep &#8220;error&#8221; logfile.txt finds all lines containing the word error. grep -r searches recursively through directories. grep -i makes the search case-insensitive.<\/p>\n\n\n\n<p><strong>24. What does the pipe operator | do in Linux?<\/strong><\/p>\n\n\n\n<p>The pipe operator passes one command&#8217;s output as input to the next command. For example, ps aux | grep nginx runs ps aux and feeds its output directly into grep to filter lines containing nginx. Pipes are fundamental to Linux command-line workflows.<\/p>\n\n\n\n<p><strong>25. What is the difference between &gt; and &gt;&gt; in Linux?<\/strong><\/p>\n\n\n\n<p>Both redirect command output to a file. The single &gt; overwrites the file completely if it already exists. The double &gt;&gt; appends the output to the end of the file without deleting existing content. Always use &gt;&gt; when you want to keep existing data.<\/p>\n\n\n\n<p><strong>26. What is the find command used for?<\/strong><\/p>\n\n\n\n<p>find searches for files and directories based on criteria like name, size, type, permissions, or modification time. find \/home -name &#8220;*.txt&#8221; finds all .txt files under \/home. find . -type f -size +10M finds files larger than 10MB in the current directory.<\/p>\n\n\n\n<p><strong>27. What is sudo in Linux?<\/strong><\/p>\n\n\n\n<p>sudo stands for superuser do. It allows a permitted user to run a specific command with root (administrator) privileges without switching to the root account. It is more secure than logging in as root because it logs every privileged command executed.<\/p>\n\n\n\n<p><strong>28. What is the difference between su and sudo?<\/strong><\/p>\n\n\n\n<p>su switches the entire session to another user account, typically root, requiring that user&#8217;s password. sudo runs only a single command with elevated privileges and requires the current user&#8217;s own password. sudo is safer and preferred in modern Linux systems.<\/p>\n\n\n\n<p><strong>29. How do you check disk usage in Linux?<\/strong><\/p>\n\n\n\n<ul>\n<li><strong>df -h<\/strong> shows disk space usage of all mounted file systems in human-readable format<\/li>\n\n\n\n<li><strong>du -sh foldername<\/strong> shows the total size of a specific folder<\/li>\n\n\n\n<li>df is for file system level. du is for directory and file level.<\/li>\n<\/ul>\n\n\n\n<p><strong>30. What is the \/etc\/passwd file?<\/strong><\/p>\n\n\n\n<p>\/etc\/passwd is a plain text file that stores basic information about every user account on the system. Each line represents one user and contains username, UID, GID, home directory, and default shell. Modern Linux does not store passwords here. They are in \/etc\/shadow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Level 3: Advanced Linux Interview Questions and Answers<\/strong><\/h2>\n\n\n\n<p>These Linux interview questions and answers are asked for senior developer, DevOps, and system administrator roles.<\/p>\n\n\n\n<p><strong>31. What is a zombie process in Linux?<\/strong><\/p>\n\n\n\n<p>A zombie process is a process that has finished execution but still has an entry in the process table because its parent has not yet read its exit status. It consumes no resources except a PID slot. Too many zombies can exhaust the PID space.<\/p>\n\n\n\n<p><strong>32. What is a daemon in Linux?<\/strong><\/p>\n\n\n\n<p>A daemon is a background service process that runs continuously without user interaction. It typically starts at boot time and waits for events or requests. Examples include sshd (SSH server), httpd (Apache), and cron (scheduled tasks). Daemon names often end in d.<\/p>\n\n\n\n<p><strong>33. What is cron and crontab in Linux?<\/strong><\/p>\n\n\n\n<p>cron is the Linux task scheduler that runs commands automatically at specified times. crontab is the configuration file where you define scheduled jobs. A crontab entry has five time fields (minute, hour, day, month, weekday) followed by the command to run.<\/p>\n\n\n\n<p><strong>34. What does a crontab entry 0 2 * * * \/backup.sh mean?<\/strong><\/p>\n\n\n\n<p>It means run \/backup.sh at 2:00 AM every day of every month on every weekday. The five fields are minute(0), hour(2), day(<em>=every), month(<\/em>=every), weekday(*=every). The asterisk means &#8220;all values&#8221; for that field.<\/p>\n\n\n\n<p><strong>35. What is the difference between TCP and UDP in the context of Linux networking?<\/strong><\/p>\n\n\n\n<p>TCP (Transmission Control Protocol) is connection-oriented, reliable, and ensures packets are delivered in order with error checking. UDP (User Datagram Protocol) is connectionless, faster, and does not guarantee delivery or order. Use netstat or ss commands in Linux to view active TCP and UDP connections.<\/p>\n\n\n\n<p><strong>36. What is the netstat command and what replaced it?<\/strong><\/p>\n\n\n\n<p>netstat displays network connections, routing tables, and interface statistics. Modern Linux distributions have deprecated it in favour of the ss command, which is faster and more efficient. ss -tuln shows all listening TCP and UDP ports without resolving names.<\/p>\n\n\n\n<p><strong>37. What is the difference between a process and a thread in Linux?<\/strong><\/p>\n\n\n\n<p>A process is an independent program with its own memory space. A thread is a lightweight unit of execution that shares memory with other threads inside the same process. Processes are isolated. Threads within a process share code, data, and file descriptors.<\/p>\n\n\n\n<p><strong>38. What is swap space in Linux?<\/strong><\/p>\n\n\n\n<p>Swap space is a dedicated area on disk that Linux uses as virtual memory when physical RAM is full. It is slower than RAM but prevents the system from crashing due to out-of-memory errors. Use free -h to check RAM and swap usage. Use swapon and swapoff to manage swap.<\/p>\n\n\n\n<p><strong>39. What is the difference between \/etc\/hosts and DNS?<\/strong><\/p>\n\n\n\n<p>\/etc\/hosts is a local file that maps hostnames to IP addresses on the machine itself. It is checked before DNS queries. DNS is a distributed network service that resolves hostnames globally across the internet. \/etc\/hosts takes priority over DNS by default on most Linux systems.<\/p>\n\n\n\n<p><strong>40. What is SELinux?<\/strong><\/p>\n\n\n\n<p>SELinux (Security-Enhanced Linux) is a mandatory access control security module built into the Linux kernel. It enforces strict policies that restrict what processes and users can do beyond standard file permissions. The NSA developed it, and it is the default security module in RHEL, CentOS, and Fedora.<\/p>\n\n\n\n<p><strong>41. What is the difference between systemctl and service?<\/strong><\/p>\n\n\n\n<p>service is the older command for managing init.d services. systemctl is the modern command for managing systemd services. Use systemctl start nginx, systemctl stop nginx, systemctl status nginx, and systemctl enable nginx for starting, stopping, checking status, and enabling on boot respectively.<\/p>\n\n\n\n<p><strong>42. How do you check system resource usage in Linux?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Command<\/strong><\/td><td><strong>What It Shows<\/strong><\/td><\/tr><tr><td>top<\/td><td>Live CPU and memory per process<\/td><\/tr><tr><td>htop<\/td><td>Enhanced visual version of top<\/td><\/tr><tr><td>free -h<\/td><td>RAM and swap usage<\/td><\/tr><tr><td>df -h<\/td><td>Disk space per partition<\/td><\/tr><tr><td>iostat<\/td><td>CPU and disk I\/O statistics<\/td><\/tr><tr><td>vmstat<\/td><td>Virtual memory and CPU stats<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>43. What is a runlevel in Linux?<\/strong><\/p>\n\n\n\n<p>A runlevel defines the system state and which services are running. Traditional Linux uses runlevels 0 to 6. Modern systems using systemd replaced runlevels with targets. Runlevel 0 is shutdown, runlevel 6 is reboot, runlevel 3 is multi-user without GUI, and runlevel 5 is multi-user with GUI.<\/p>\n\n\n\n<p><strong>44. What is the difference between ext4, XFS, and Btrfs file systems?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>File System<\/strong><\/td><td><strong>Best For<\/strong><\/td><\/tr><tr><td>ext4<\/td><td>General purpose, most widely used, stable<\/td><\/tr><tr><td>XFS<\/td><td>Large files, high-performance servers<\/td><\/tr><tr><td>Btrfs<\/td><td>Advanced features like snapshots and checksums<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>ext4 is the default on Ubuntu and Debian. XFS is default on RHEL and CentOS. Btrfs is default on openSUSE and Fedora.<\/p>\n\n\n\n<p><strong>45. How do you troubleshoot a server that is unreachable over SSH?<\/strong><\/p>\n\n\n\n<ul>\n<li><strong>Check network:<\/strong> ping the server IP to test connectivity<\/li>\n\n\n\n<li><strong>Check SSH service:<\/strong> verify sshd is running with systemctl status sshd<\/li>\n\n\n\n<li><strong>Check firewall:<\/strong> confirm port 22 is open with iptables -L or firewall-cmd &#8211;list-all<\/li>\n\n\n\n<li><strong>Check logs:<\/strong> review \/var\/log\/auth.log or \/var\/log\/secure for SSH errors<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>46. What is the difference between Linux namespaces and cgroups?<\/strong><\/p>\n\n\n\n<p><strong>Namespaces<\/strong> isolate what a process can <strong>see<\/strong>, while <strong>cgroups<\/strong> control how much system resources a process can <strong>use<\/strong>.<\/p>\n\n\n\n<ul>\n<li>Namespaces provide isolation for processes, networking, mounts, hostnames, etc.<\/li>\n\n\n\n<li>Cgroups limit resources such as CPU, memory, and I\/O.<\/li>\n\n\n\n<li>Both are important technologies behind Linux containers.<\/li>\n<\/ul>\n\n\n\n<p>For example, containers use namespaces to give processes an isolated environment and cgroups to prevent them from consuming unlimited resources.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsns<\/code><\/pre>\n\n\n\n<p>You can use <code>lsns<\/code> to view namespaces on a Linux system.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>47. What happens when you run a command in Linux?<\/strong><\/p>\n\n\n\n<p>When you enter a command, the <strong>shell interprets it and finds the executable<\/strong>, usually using the <code>PATH<\/code> variable.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -l \/var\/log<\/code><\/pre>\n\n\n\n<p>The general process is:<\/p>\n\n\n\n<ul>\n<li>The shell reads and interprets the command.<\/li>\n\n\n\n<li>It searches for <code>ls<\/code> using <code>PATH<\/code>.<\/li>\n\n\n\n<li>A process is created to execute the program.<\/li>\n\n\n\n<li>The <code>exec<\/code> system call loads the <code>ls<\/code> program.<\/li>\n\n\n\n<li>The kernel provides the required resources.<\/li>\n\n\n\n<li>The program runs and returns an exit status to the shell.<\/li>\n<\/ul>\n\n\n\n<p>You can check where a command is located with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>which ls<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>48. What is the difference between user space and kernel space in Linux?<\/strong><\/p>\n\n\n\n<p>Linux separates normal applications from privileged operating-system operations into <strong>user space<\/strong> and <strong>kernel space<\/strong>.<\/p>\n\n\n\n<ul>\n<li><strong>User space:<\/strong> Applications such as Python, Bash, Nginx, and Java run here.<\/li>\n\n\n\n<li><strong>Kernel space:<\/strong> The Linux kernel runs here with privileged access to memory, CPU, devices, and other system resources.<\/li>\n\n\n\n<li>Applications use <strong>system calls<\/strong> to request services from the kernel.<\/li>\n<\/ul>\n\n\n\n<p>For example, when an application needs to read a file, it asks the kernel to perform the operation rather than accessing the disk directly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Application\n     \u2193\nUser Space\n     \u2193\nSystem Call\n     \u2193\nKernel Space\n     \u2193\nHardware<\/code><\/pre>\n\n\n\n<p>This separation helps protect the system from faulty or unauthorized applications.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>49. What is a file descriptor in Linux?<\/strong><\/p>\n\n\n\n<p>A <strong>file descriptor (FD)<\/strong> is a number that a process uses to access an open resource. It can represent a file, socket, pipe, terminal, or device.<\/p>\n\n\n\n<p>The three standard file descriptors are:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong>FD<\/strong><\/th><th><strong>Name<\/strong><\/th><th><strong>Purpose<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>0<\/strong><\/td><td>stdin<\/td><td>Input<\/td><\/tr><tr><td><strong>1<\/strong><\/td><td>stdout<\/td><td>Normal output<\/td><\/tr><tr><td><strong>2<\/strong><\/td><td>stderr<\/td><td>Error output<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls \/proc\/$$\/fd<\/code><\/pre>\n\n\n\n<p>This shows the file descriptors currently open by your shell.<\/p>\n\n\n\n<p>File descriptors are especially important for servers because every network connection or opened file can consume an FD. If the application reaches its limit, you may see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Too many open files<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>50. What is the difference between a signal and a system call in Linux?<\/strong><\/p>\n\n\n\n<p>A <strong>system call<\/strong> is a request a program makes to the Linux kernel to perform an operation. A <strong>signal<\/strong> is a notification sent to a process when an event occurs or an action is requested.<\/p>\n\n\n\n<p><strong>System call examples:<\/strong><\/p>\n\n\n\n<ul>\n<li><code>read()<\/code> \u2014 read data<\/li>\n\n\n\n<li><code>write()<\/code> \u2014 write data<\/li>\n\n\n\n<li><code>open()<\/code> \u2014 open a resource<\/li>\n\n\n\n<li><code>execve()<\/code> \u2014 execute a program<\/li>\n<\/ul>\n\n\n\n<p><strong>Signal examples:<\/strong><\/p>\n\n\n\n<ul>\n<li><code>SIGINT<\/code> \u2014 interrupt, usually from <code>Ctrl+C<\/code><\/li>\n\n\n\n<li><code>SIGTERM<\/code> \u2014 request graceful termination<\/li>\n\n\n\n<li><code>SIGKILL<\/code> \u2014 forcefully terminate<\/li>\n\n\n\n<li><code>SIGHUP<\/code> \u2014 commonly used to request a reload<\/li>\n<\/ul>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kill -TERM 1234<\/code><\/pre>\n\n\n\n<p>This sends <code>SIGTERM<\/code> to process <code>1234<\/code>, giving the application an opportunity to shut down cleanly.<\/p>\n\n\n\n<p><strong>Simple difference:<\/strong><\/p>\n\n\n\n<ul>\n<li><strong>System call:<\/strong> A program asks the kernel to do something.<\/li>\n\n\n\n<li><strong>Signal:<\/strong> A process receives a notification or request.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Quick Reference: Most Important Linux Commands for Interviews<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Commands<\/strong><\/td><td><strong>Category<\/strong><\/td><td><strong>Respective Purpose<\/strong><\/td><\/tr><tr><td>pwd, ls, cd<\/td><td>Navigation<\/td><td>Show location, list files, change directory<\/td><\/tr><tr><td>cp, mv, rm, touch, mkdir<\/td><td>File ops<\/td><td>Copy, move, delete, create file, create directory<\/td><\/tr><tr><td>chmod, chown, chgrp<\/td><td>Permissions<\/td><td>Change permissions, owner, group<\/td><\/tr><tr><td>ps, top, kill, bg, fg<\/td><td>Processes<\/td><td>View, monitor, stop, background, foreground processes<\/td><\/tr><tr><td>df, du, mount, umount<\/td><td>Disk<\/td><td>Disk space, folder size, mount drives<\/td><\/tr><tr><td>ping, ifconfig, ip, ss, netstat<\/td><td>Networking<\/td><td>Test connectivity, view interfaces, check ports<\/td><\/tr><tr><td>find, grep, locate<\/td><td>Search<\/td><td>Find files, search content, quick file lookup<\/td><\/tr><tr><td>cat, less, head, tail, nano, vim<\/td><td>Text<\/td><td>View and edit file content<\/td><\/tr><tr><td>useradd, passwd, usermod, su, sudo<\/td><td>Users<\/td><td>Create users, change passwords, switch users<\/td><\/tr><tr><td>uname, uptime, free, hostname<\/td><td>System<\/td><td>OS info, uptime, memory, hostname<\/td><\/tr><tr><td>journalctl, dmesg, tail -f<\/td><td>Logs<\/td><td>View system logs and kernel messages<\/td><\/tr><tr><td>systemctl, service<\/td><td>Services<\/td><td>Start, stop, enable, check services<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Tips for Cracking Linux Interview Questions and Answers<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"630\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/Tips-for-Cracking-Linux-Interview-Questions-and-Answers-1200x630.webp\" alt=\"tips for cracking Linux interview questions and answers\" class=\"wp-image-120638\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/Tips-for-Cracking-Linux-Interview-Questions-and-Answers-1200x630.webp 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/Tips-for-Cracking-Linux-Interview-Questions-and-Answers-300x158.webp 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/Tips-for-Cracking-Linux-Interview-Questions-and-Answers-768x403.webp 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/Tips-for-Cracking-Linux-Interview-Questions-and-Answers-1536x806.webp 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/Tips-for-Cracking-Linux-Interview-Questions-and-Answers-2048x1075.webp 2048w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/Tips-for-Cracking-Linux-Interview-Questions-and-Answers-150x79.webp 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<ul>\n<li><strong>Know your commands cold.<\/strong> Interviewers often ask what a command does or ask you to pick the right command for a task. The commands in the quick reference table above are the non-negotiables.<\/li>\n\n\n\n<li><strong>Understand permissions deeply.<\/strong> chmod, chown, and reading permission strings are asked in almost every single linux interview. Know numeric and symbolic modes.<\/li>\n\n\n\n<li><strong>Practice explaining processes.<\/strong> Questions about foreground, background, zombie, and daemon processes are very common in mid-level and senior interviews.<\/li>\n\n\n\n<li><strong>Be ready for scenario questions.<\/strong> Senior interviews often say, &#8220;The server is slow; what do you do?&#8221; Walk through top, free -h, df -h, and iostat systematically.<\/li>\n\n\n\n<li><strong>Know the difference between similar tools.<\/strong> ps vs top, su vs sudo, &gt; vs &gt;&gt;, hard link vs soft link. Interviewers love testing these pairs.<\/li>\n\n\n\n<li><strong>Revise systemctl.<\/strong> In 2026, every Linux interview expects you to know systemd and systemctl commands for service management.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Preparing for Linux interview questions and answers is less about collecting every possible command and more about building a habit of understanding why things work the way they do. <\/p>\n\n\n\n<p>Practice on a real system, break things on purpose, and fix them while explaining your steps out loud. That is what interviewers remember, and it is what turns a nervous candidate into a confident one. Keep learning, stay curious, and the right opportunity will follow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>FAQs<\/strong><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1790264594771\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">1. What are the most common Linux interview questions and answers?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The most common questions cover Linux basics, commands, file permissions, processes, networking, and system administration.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1790264668213\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">2. What Linux interview questions should beginners prepare?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Beginners should focus on the Linux kernel, shell, file system, permissions, <code>chmod<\/code>, and basic commands like <code>ls<\/code>, <code>cp<\/code>, <code>mv<\/code>, and <code>rm<\/code>.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1790264669044\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">3. What Linux interview questions are asked for experienced candidates?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Experienced candidates should prepare for questions on processes, networking, SELinux, systemd, cron, SSH troubleshooting, and file systems.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1790264695191\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">4. What Linux commands should I know for an interview?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Know essential commands such as <code>ls<\/code>, <code>cd<\/code>, <code>chmod<\/code>, <code>ps<\/code>, <code>top<\/code>, <code>kill<\/code>, <code>df<\/code>, <code>du<\/code>, <code>grep<\/code>, <code>find<\/code>, <code>ss<\/code>, <code>systemctl<\/code>, and <code>journalctl<\/code>.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1790264706692\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">5. How can I prepare for Linux interviews?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Practice commands on a real Linux system and focus on concepts, troubleshooting scenarios, permissions, processes, and networking.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Most candidates walk into a Linux interview having memorized a handful of commands, only to be asked why a server is running slow or what happens when a process refuses to die. Even after going through dozens of Linux interview questions and answers, that gap between what you studied and what they actually ask is [&hellip;]<\/p>\n","protected":false},"author":64,"featured_media":120636,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[719],"tags":[],"views":"2418","authorinfo":{"name":"Abhishek Pati","url":"https:\/\/www.guvi.in\/blog\/author\/abhishek-pati\/"},"thumbnailURL":"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/05\/Linux-Interview-Questions-and-Answers-Fresher-to-Expert-Level-300x116.webp","_links":{"self":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/111555"}],"collection":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/comments?post=111555"}],"version-history":[{"count":8,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/111555\/revisions"}],"predecessor-version":[{"id":140674,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/111555\/revisions\/140674"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media\/120636"}],"wp:attachment":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media?parent=111555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/categories?post=111555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/tags?post=111555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}