
Linux is one of the most widely used operating systems in both personal and enterprise environments. Whether you’re aiming to become a system administrator, DevOps engineer, software developer, or IT professional, having a solid foundation in Linux is essential.
To support your learning and interview preparation, we’re excited to introduce a dedicated Linux Interview section on Tecmint, which will feature carefully selected Linux interview questions, along with detailed answers to help you prepare with confidence.
Every weekend, we’ll publish a new article in this section, starting from basic Linux questions and gradually moving toward more advanced topics. This initiative is one of the first of its kind among Linux-focused websites, and we’re committed to delivering high-quality, useful, and unique content.
Let’s get started with 15 basic Linux interview questions and answers to kick off the series.
Q1: What is the core of the Linux Operating System?
The core of the Linux operating system is the Kernel, which is the lowest level of the OS and acts as a bridge between the hardware and the software. It is responsible for managing system resources such as memory, CPU time, device drivers, and system calls.
The Linux Kernel is monolithic, meaning it includes the core system functions, device drivers, and file system management all within a single large block of code running in a single address space.
Q2: What Did Linus Torvalds Create?
Linus Torvalds created the Linux Kernel in 1991. It began as a hobby project while he was a student at the University of Helsinki, Finland. Initially inspired by MINIX (a Unix-like system for education), he created a free, open-source alternative.
Over time, the Linux Kernel evolved into the core of many operating systems, collectively referred to as Linux distributions (e.g., Ubuntu, Fedora, Debian).
Q3: Did Linus Torvalds Write Most of the Linux Kernel in C++?
No, this is incorrect. Linus Torvalds wrote most of the Linux Kernel in the C programming language, not C++. In fact, Linus has been publicly critical of using C++ in kernel development due to concerns about performance, complexity, and reliability.
The C language is preferred in kernel development because it provides low-level memory access, minimal runtime overhead, and maximum control over hardware resources.
Q4: Was Linux Initially Developed for Intel x86 Architecture, and Has It Been Ported to Other Platforms?
Yes, Linux was initially developed for the Intel x86 architecture (32-bit systems), but over the years, it has been successfully ported to a wide range of hardware architectures.
These include ARM, PowerPC, SPARC, MIPS, and even mainframes. Today, Linux runs on everything from smartphones and tablets to servers, supercomputers, routers, and embedded systems.
Q5: Is It Legal to Edit the Linux Kernel?
Yes, it is entirely legal to edit the Linux Kernel, as it is released under the GNU General Public License (GPL) version 2, which means it allows users to view, modify, and redistribute the source code freely, as long as any modifications are also made available under the same license.
This freedom is one of the reasons Linux has become so popular and widely adopted in various projects.
Q6: What is the Basic Difference Between UNIX and Linux?
UNIX is a proprietary operating system originally developed at AT&T’s Bell Labs in the 1970s. Linux, on the other hand, is a UNIX-like operating system that is free and open-source.
While UNIX systems are often used in commercial environments and have different variants (e.g., AIX, Solaris, HP-UX), Linux is a community-developed system that shares similar principles and design with UNIX but is not derived from UNIX code.
Key differences include:
Feature | UNIX | Linux |
---|---|---|
Licensing | Proprietary | Open-source (GNU General Public License) |
Cost | Usually requires purchasing a license | Free |
Hardware | Often used on specialized hardware | Supports a broad range of hardware devices |
Q7: Is the Linux Operating System Virus-Free?
No operating system is completely virus-free, including Linux. However, Linux is considered more secure than many others due to its permission-based structure, user role separation, and large community of developers who actively maintain and patch vulnerabilities.
Additionally, Linux is less targeted by malware due to its smaller desktop market share compared to Windows. That said, administrators should still use security best practices and tools like firewalls, SELinux, and antivirus software.
Q8: What Type of Operating System is Linux?
Linux is a multi-user, multitasking, and multi-threaded operating system.
Specifically, it is a:
- Unix-like OS
- Open-source OS
- Modular and monolithic Kernel-based OS
Linux is used as both a server OS and a desktop OS and supports features such as process scheduling, virtual memory, shared libraries, and dynamic loading.
Q9: What is the Syntax of a Linux Command?
The general syntax of a Linux command is:
command [options] [arguments]
For example:
ls -l /home/user
Here,
ls
is the command (list directory contents).-l
is an option (long listing format)./home/user
is the argument (the directory to list).
Q10: What is a Linux Distribution?
A Linux distribution (or distro) is a complete operating system based on the Linux Kernel and includes system software, package managers, and often a graphical user interface (GUI).
Examples include Ubuntu, CentOS, Fedora, Arch Linux, and Debian. Each distribution serves different purposes and caters to different users from beginners to enterprise environments.
Q11: What are Runlevels in Linux?
Runlevels are predefined states of the machine in Unix-like systems that define what services are running.
Traditional SysV init systems used numbered runlevels such as:
0
– Halt1
– Single-user mode3
– Multi-user mode (without GUI)5
– Multi-user mode with GUI6
– Reboot
Most modern Linux distributions (such as Fedora, CentOS 7+, Ubuntu 15.04+, and others) have replaced the SysV init system with systemd, which uses targets instead of runlevels for managing system states.
Here’s how systemd targets map to traditional runlevels:
Runlevel | systemd Target | Description |
---|---|---|
0 | poweroff.target | Shut down the system |
1 | rescue.target | Single-user mode |
3 | multi-user.target | Multi-user mode, CLI only |
5 | graphical.target | Multi-user mode with GUI |
6 | reboot.target | Reboot the system |
Q12: What is the Difference Between Hard Links and Soft Links?
- Hard Link: Points directly to the data on the disk (inode). If the original file is deleted, the hard link still works.
- Soft Link (Symbolic Link): Acts like a shortcut. It points to the original file by path. If the original file is removed, the symbolic link becomes broken.
Q13: What is a Shell in Linux?
A shell is a command-line interface that allows users to interact with the operating system. It interprets user commands and passes them to the Kernel for execution.
Popular Linux shells include:
- Bash (Bourne Again Shell)
- Zsh (Z Shell)
- Ksh (KornShell)
- Tcsh (TENEX C Shell)
Q14: How Do You Check Memory Usage in Linux?
You can check memory usage using the following commands:
- free -h: Displays used, free, and total memory.
- top: Real-time view of system processes and memory usage.
- vmstat: Reports memory, CPU, and I/O usage.
- htop: Interactive process viewer (needs to be installed).
Q15: How is File Permission Represented in Linux?
File permissions in Linux are represented using three sets of attributes:
- User (owner)
- Group
- Others
Each set includes permissions for:
- Read (r)
- Write (w)
- Execute (x)
Example:
-rwxr-xr-- 1 user group 1234 Jan 1 12:00 file.txt
This means:
- Owner has read, write, execute
- Group has read, execute
- Others have only read
You can change permissions using chmod
and change ownership using chown.
Conclusion
Understanding the basics of Linux is crucial for many roles in modern IT environments. These questions cover foundational knowledge you’re likely to encounter in entry-level interviews.
As you progress, consider exploring more advanced topics such as process management, scripting, file systems, and networking in Linux.