Linux Basic Interview Questions for Beginners

FREE Online Courses: Elevate Your Skills, Zero Cost Attached - Enroll Now!

In this article, we will go through 40 of the most beautiful basic interview questions on Linux. However, it must be noted that this article is targeted at newbies and rookies – to people new to Linux. Nonetheless, even professional and seasoned Linux users can go through this article for a quick revision. So without any further ado, let’s start!

Linux Basic Interview Questions for Beginners

Q1. What is Linux?

Linux is an operating system based on the Linux kernel. It is considered to be one of the best-operating systems in the world as it has many incomparable features. Linux is an open-source, free operating system, which is both user-friendly and techy.

Q2. Why is Linux being open source an advantage?

Linux is open-source, meaning that anyone can obtain the source code as it is under the General Public License (GNU GPL). People can also modify this source code according to their needs, the best part is that people can even publish and sell this modified version!

Q3. Who invented Linux? Give a brief history of Linux.

Linus Torvalds created the Linux operating system while he was just a student at the University of Helsinki. Linus started to develop an operating system similar to UNIX because he thought to have a freely available version of UNIX. It was originally a personal project for him, which turned out to be the world’s best operating system.

While Linus was developing the operating System of his visions, he thought he would call it “Freax”, taking into account the ‘free’ and ‘X’ which stands for the free version of UNIX. However, when Linus submitted the files named ‘freax’ to the FTP server in order to facilitate development, Ari Lemmeke from the same university, changed the project name to Linux without consulting Linus. Later Linus consented to “Linux”.

Q4. what is the difference between Unix and Linux?

Since Linux is based on Unix, there are many differences between both the operating systems, nonetheless here are a few:

LINUXUNIX
Linux is open source and anyone can obtain the source. Unix is not open source and is available only to its copyrighters. 
Linux has both paid and unpaid versions. Unix has different paid structures for different levels of Unix. 
Linux is a combination of both GUI and the terminal Unix is primarily focused and uses the command-line interface. 
Linux is developed and maintained by a huge community that consists of people from all over the world. Unix is developed and maintained by AT&T labs and the copyright who have the source code. 
Linux is mostly focused on home users and on some serversUnix is targeted solely on servers, mainframes, workstations, etc.
Linux operating system is portable as you can even carry it on a USBUnix operating system is not portable
The Linux operating system was initially developed for Intel’s x86 hardware processors. It was only later that it was available for over twenty different types of CPU which also includes an ARM.Unix is also versatile enough for the few users and purposes it is used for. It is available on Itanium and PA-RISC machines. These are the types of machines that are mainly used for servers, and workstations 

Q5. What is the difference between Linux and Windows?

There are many differences between Microsoft Windows and Linux, here are some of them:

LINUXWINDOWS
Linux is an open-source operating system Windows is not an open-source operating system
Linux is more secure than Windows. So secure that you don’t even need to download an antivirus once you install it. Windows on the other hand is not entirely secure. It is nothing when compared to the security offered by Linux-based operating systems. 
There are a variety of distributions that Linux offers. Each one is specifically tuned and designed for a specific purpose. Windows does not have any distros. 
Linux is so stable that there are hundreds of Linux-based servers that have been running in mint condition without even restarting them even once!Windows is not entirely stable, many people report it to hang and slow down under load and need to reboot their system. 
Linux-based operating systems are known for their performance, so much so that 98% of the supercomputers, including the fastest supercomputer Fugaku, run on Linux. Windows when compared with Linux has very negligible performance, though it can handle daily home user takes. 
Linux is extremely private. If you are using any Linux-based operating system, you have an operating system that does not spy on you. Linux comes with the option of built-in military-grade encryption. Windows is not very private. It can watch what its users are doing. For example, Microsoft also tracks your behavior on the web and off the web to improve their personal assistant Cortana. 

Q6. Which do you think is better, Linux or Windows and why?

I think that for average simple day-to-day users and gaming, Windows would be sufficient, but if you are looking for a robust open-source, secure, operating system that is highly stable even under immense loads, you can choose Linux. The fact that there are a thousand distributions of Linux makes it easy to choose from. The reason I would choose Linux is that it is developed by a community and any bug or problem will be instantly fixed as there are millions of people from every nook and cranny of the world constantly working to make Linux better!

Q7. What is a Linux kernel?

We all know that a computer needs both software and hardware to function. So to make it easier for a piece of software (for example a web browser) to interact with the physical components of the computer, it makes sense to have a layer of software that acts as an abstraction between the hardware and the software. In simple terms, the kernel acts as the mediator between the hardware and the software.

Q8. How does the Linux kernel work?

Most kernels work by responding to system calls. These are called by different parts of the operating system to get actual physical hardware to do things.An example of this is your C library. If you run software that was written in C on your computer, then it is up to your C library to give the appropriate kernel system calls, to make the computer run it.

Q9. What is the kernel’s place in the operating system?

The kernel is the sole heart of any operating system in the world. As discussed above, any system needs hardware and software to work, and the kernel works as the mediator between them. The hardware is like the hands and legs of the system, it is the physical part of the machine. These consist of the CPU, RAM, and Input/output devices such as keyboard, mouse, etc.

The kernel is the core of the operating system, it is right in the middle acting as the mediator between the hardware and the software, and the software consists of user programs, which are the running programs the kernel manages. these user programs collectively make up the userspace. The kernel also allows these processes and servers to communicate with each other.

Q10. What is a shell?

An operating system consists of many parts, but the 2 core parts are the kernel and shell, The shell on the other hand is more like the right hand of the kernel, it takes input from you in the form of commands, and processes it, and then gives an output. The shell is retrieved via the terminal that runs it. Shell also provides an interface through which a user works on programs and scripts.

Q11. What are the different types of shells in Linux? Explain them briefly.

Shell is broadly classified into 2 categories: command-line shell and graphical shell.

The shell can be accessed by using a command-line interface, and we all know what a command line is. It is nothing but the terminal in Linux – the lean, mean coding machine. The terminal is a special program to type in the human-readable commands such as “cat”, “ls”, “cd”, “pwd”, “mkdir”, etc

The graphical shell is nothing but the GUI – Graphical interface design. The graphical shell provides an interface for manipulating programs based on the graphical user interface. The GUI allows users to do bath tasks that the terminal can and can not do.

Q12. Give some examples of shells.

There are many examples of shells, some of them are:
a. BASH (Bourne again shell)
b. KSH (Korn Shell)
c. CSH (C Shell)
d. ZSH (Z shell)
e. TCSH (TENEX C shell)
f. POSIX (Portable Operating System Interface)
g. Bourne shell
h. FISH (Friendly Interactive Shell )

Q13. What is BASH?

BASH is an abbreviation for Bourne Again SHell. The bash shell is the most loved and commonly used shell in Linux-based operating systems. It is a default login shell in Linux systems and in macOS, however, it can also be installed on Mi9crosoft Windows.

The prompt for the bash shell is a dollar sign ($). The bash shell is a derivative of the Bourne shell, other derivatives of the Bourne shell include POSIX and Korn.

Q14. What is KSH?

KSH is an abbreviation for Korn SHell. The Korn shell is also derived from the Bourne shell but is the base for POSIX. It was written, designed, and developed by David Korn in the early 1980s Some features of KSH are:

a. It provides object-oriented programing since ksh93t.
b. It has many mathematical and dynamic search functions.
c. it is very similar to C language and even has C-language-like expressions
d. You get a choice of 3 command line editing styes: vi, Emacs, and Gosling.
e. KSH includes reference variables and hierarchically nested variables.
f. It has associative arrays and built-in floating-point arithmetic operators
g. the Korn shell provides process substitution and process redirection.

Q15. What is CSH?

CSH is an abbreviation for C SHell. The C shell was written, designed, and developed at the University of California by Bill Joy. J8ust like bash has the prompt “$”, chs has the prompt “%”. The C shell was developed to be very similar to the C programming language, it also includes useful programming features like in-built support for arithmetic operations

Q16. What is LILO?

LILO is the abbreviation for Linux LOader. Most Linux-based operating systems use LILO. LILO is the boot loader that is used for the Linux operating system. It is used to boot the operating system into the main memory to start the operations.

Q17. What is CLI?

CLI is the abbreviation for Command Language Interpreter. CLI interacts with the computer program, where the user issues commands in the form of text lines. The CLI also interact with the terminals of the computer and also, the interface accepts the text lines and converts them as a command to the operating system.

Q18. What are the advantages of Linux being Open source?

Since Linux is open source, anyone can obtain the source code under the GNU license and modify it. People can also redistribute and sell this modified version! This is exactly how thousands of distributions of Linux have been born!

Q19. Explain the architecture of Linux in brief.

Linux operating system mainly consists of 3 components: Kernel, shell, and applications. The kernel is the sole heart and core of the Linux operating system. The kernel enables access to the underlying hardware like the CPU through the dispatcher, scheduler, and other peripherals.

The shell, as mentioned in the features, is a lean, mean, coding machine. The shell acts as a medium of access between the user and the kernel, and the applications provide useful functions like email, web browsers, programming tools and so many more.

Q20. What is GUI?

GUI stands for Graphical User Interface. It is the interface that we normally use on our desktops. Instead of using commands to do ur daily tasks, we can perform tasks like dragging, selecting, clicking and so many more. GUI is a human-computer interface that uses windows, images, icons, and menus that can be manipulated by using a mouse, unlike the terminal where there is absolutely no use of the mouse!

Q21. What is Swap space?

Swap space is the additional space used by the Linux operating system. This space holds concurrently running programs when the RAM does not have enough space to hold the programs. For example, When you run a program, it resides on the RAM so that the processor can fetch data quickly. And if you are additionally running more programs than the RAM can hold, then these running programs are stored in the Swap Space.

Q22. Explain why the terminal is one of Linux’s strong points?

The kernel is the sole heart and core of the Linux operating system. The kernel enables access to the underlying hardware like the CPU through the dispatcher, scheduler, and other peripherals. The terminal is such a strong pint of Linux as it helps us do all th tasks we can do with the GUI and more. We can use simple commands like pwd, cs, ls, cat mkdir, rm to do daily simple tasks and also use complex commands like wget, telnet, ftp, ping, ssh, etc to do various complex and technical tasks. The terminal is basically a leam mean coding machine!

Q23. What are processes?

In layman’s terms, a process is a series of steps taken to do something. In computer science the definition of ‘something’ changes. A process is a program in execution and consists of the data read from files, input from a user, program instructions, and many more.

A process in Linux starts every time you start an application or run a program or command. A program or command creates only one process, but an application on the other hand has the capability to start multiple processes to accomplish various tasks.

Q24. What is PID?

PID is the abbreviation for Process Identity. Every single process in the system is given a unique number called the PID when it starts. We can identify or call any process by using the PID.

Q25. What is a virtual machine?

A Virtual Machine is a software that creates a virtualized environment between the computer platform and the end-user in which the end-user can operate software. It provides an interface identical to the underlying bare hardware. The operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory.

Q26. What is a virtual desktop?

The virtual desktop allows users to use the desktop beyond the physical limits of the screen. A virtual desktop creates a virtual screen to expand the limitation of the normal screen. Virtual desktops can be implemented in 2 ways: Switching desktops and oversized desktops.

Q27. What are the types of processes? Explain each one of them in brief.

In Linux, processes are of 2 types, let us go through each of them: the Foreground process, and background processes.

Foreground processes are also called as interactive processes. These processes are launched and controlled through the command line in a terminal session. There has to be a user in the system to start such foreground processes as they cannot start automatically by themselves.

Background processes are also called as non-interactive processes. These processes are the complete opposite of the Foreground process. They don’t need any user input and are not connected to the terminal.

Q28. What are daemons?

Damons are computer programs that run as background processes to provide functions that might not be available in the standard Operating System. They usually run services in the background without directly being in control of interactive users. Daemons handle periodic requests and then forward the requests to appropriate programs for execution.

Q29. What are the different states of processes?

Processes have 5 stages from thor creation, they are

1. Creation – a process is normally created when an application or program makes an exact copy of itself in the memory.

2. Running – In this stage, a process is either up and running or ready to run, meaning it is waiting to be assigned to one of the CPUs.

3. Waiting – In this phase, the process is waiting for something (or an event) to occur. It could also be waiting for a particular system resource.

4. Stopped – In this phase, a process is stopped. Processes usually stop by receiving a signal.

5. Zombie – In this state the process, as the name suggests, is dead, meaning it has been stopped and still has an entry in the process table.

Q30. What is the init process?

The init process is a parent of all the processes that are happening in the system. The init process is the very first program that is executed when the system starts up and is started by the kernel itself. Since the init process is the holy mother of all processes, it manages all the processes on the system, and it does not have a parent.

Q31. What are child processes and parent processes?

Parent processes – These are the processes that create other processes.
Child processes – These are the processes that are created by other processes.

Q32. What is Ubuntu?

Ubuntu is one of the thousand distributions of Linux. It is the gateway to Linux for most users. It is based on the gnome environment and the focus is more on the GUI over the terminal, you get a good enough file explorer, app drawer, browser, etc. This is not very technical and is simple enough for beginners to use and advanced enough for pros to code in.

Q33. Give a brief history of Ubuntu.

The word ubuntu is derived from a word in the African Zulu language which means “humanity to others”. A South African tech-head, Mark Shuttleworth had a vision of creating a simple user-friendly operating system. That is when he took the open-source code of the Debian Linux and worked on it to make it more human-friendly, which he named Ubuntu.

Q34. List any 3 flavors of Ubuntu and explain them briefly.

Just as Linux comes in different distros which are made to handle specific tasks, Ubuntu also comes with a couple of different flavors, some of these are

1. Kubuntu – Kubuntu is an Ubuntu flavor that uses the KDE plasma interface for the desktop, unlike Ubuntu which uses the GNOME environment. Apart from the look and feel of the interface, everything else is exactly the same.

2. Lubuntu – Lubuntu is another flavor of Ubuntu that is slightly stripped down so that it is lighter than Ubuntu which makes it less resource hungry and more energy-efficient. The latest version of Lubuntu uses the LXQt desktop interface.

3. Ubuntu Kylin – It is a flavor of Ubuntu that is focused and aimed toward the Chinese market and consumers.

Q35. What are the 4 ecosystems of Ubuntu? Explain them in brief.

Ubuntu runs on different ecosystems for different uses like day-to-day tasks of editing files and watching videos to hosting servers that handle databases and websites. The 4 ecosystems are

1. Ubuntu desktop – This is the standard Ubuntu you can download from the internet which is a whole Ubuntu desktop operating system that helps us run applications and do daily tasks like media consumption, editing, gaming, and writing, etc.

2. Ubuntu server – it is focused more on hosting applications like web servers and databases. This operating system has support for cloud platforms like AWS and Microsoft Azure.

3. Ubuntu core – it is a more focused operational system for the operation of technology related to the internet of things (IoT) like autonomous cars, embedded systems, robots, etc. It gives high priority to security as any malware or virus will corrupt the entire chain of IoT.

4. Ubuntu cloud – it is designed for users to create their own public or private cloud infrastructure. In fact, Ubuntu builds enhanced and certified servers for companies like Amazon, Oracle, IBM cloud, and many more.

Q36. Why is Linux suitable for programmers?

Linux is a good place for programmers as it can handle almost every single programming language like python, C, C#, C++, Java, etc. In Fact, Linux itself has shell programming / Bash scripting with its own syntax. For example, C programs can be compiled by using the syntax: gcc <filename.c>, and can be executed by using the command: ./a.out. Fun fact: more than 95% of Linux is actually written in C programming language.

Q37. What is Kali Linux?

Kali Linux is a Linux distribution based on Debian. Kali is designed for penetration testing and digital forensics. In simple words, it is used by more advanced users who are into professional network security. There are 600 penetration testing applications that come pre-configured on Kali. in fact, if you visit kali’s website, it is advertised as “our most advanced penetration testing distribution ever.”

Q38. What tasks do the preinstalled tools in Kali Linux help in?

There are 600 penetration testing applications that come pre-configured on Kali that help in performing various tasks like
a. Information Gathering
b. Password attacks
c. stress testing
d. Forensics tools
e. Wireless attacks
f. Exploitation tools
g. Vulnerability analysis
h. Web applications
i. Hardware tracking
j. Reporting tools
k. Reverse engineering
l. Maintaining access

Q39. What is SLAX?

SLAX is an extremely lightweight operating system that is meant for mediocre hardware. Slax is the deal if you want a portable PC in your Pendrive. In Fact, the very tagline of SLAX is “Packet operating system”! Slax is a modern Linux-based operating system that is small, portable, and fast.

Q40. What is GNU GPL?

GNU GPL is the abbreviation for “GNU General Public License”. It is a series of widely used free software licenses that give the end-users freedom to run, study, modify and share the software.

Summary

This was all about the Linux basic interview questions. Hope you enjoyed them and learnt from them.

Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *