Linux Interview Questions & Answers (2023)


Linux Interview Questions & Answers 2023

Here are some basic Linux Interview Questions & Answers with its help for beginners to attend your Red Hat Linux Interview.

Q 1. What is Linux?
Ans: –
Linux is an Operating System based on Unix and it was first introduced by Linus Torvalds in 1991. The main purpose of Linux was to provide a free and low-cost operating system for users who could not effort operating systems like Windows or iOS or Unix. Some of Linux distributors – Ubuntu, Red Hat, Fedora etc.

Q 2. What is Unix?
Ans: –
Unix is a multi-user, multi-tasking computer operating system developed by Ken Thompson & Dennis Ritchie. It is propitiatory software with its code not available to the general public. Some of the different Unix variants are HP Unix, Solaris Unix, IBM, ATX etc.

Q 3. What is the GNU project?
Ans: –
GNU stands for GNU’s, not Unix. In 1978, Richard Stallman has founded the GNU project at MIT. Its main role is to give computer users freedom and control of their computing devices, the users are free to run the software, share, copied, modified and redistributed.

Q 4. What are the feature of Linux?
Ans: –

It is a Open-Source Operating System.
It is reliable and very few OS crashes.
Linux Kernel is free to download, use and distribute.
It serves the purpose of multitasking by serving various function simultaneously.
It supports multiple interface.
It is using many purposes like Mobile device, Desktops, Servers, Mainframes and Super Computers.
Linux is a portable OS and it can be installed on all hardware components.
As an Operating System survey, 35% of internet server and 99% of world’s super computer are used by Linux operating system.

Q 5. Why we use Linux?
Ans: –

• It is an Open-Source Operating System and it is full permission of customized the OS.
• It’s software and server licensing are free for all.
• It has low or minimum issue with virus, malware attack etc.
• It is highly secure and supports multiple file system.

• Advantages: –

  1. You can download the file and change the code as you like.
  2. It has more advance option for users to increased security.

• Disadvantage: –

  1. It is used to very difficult and issues to its comparability.

Q 7. What is the different between Linux & Unix?
Ans: –

Linux is developed by a worldwide Linux community.Unix is developed by AT & T developers.
Linux is free and it is download through the internet under GNU Licenses.Most Unix operating System is not free.
Linux is basically used at home-based PC’s, Phone etc.Unix is used in server system, workstation etc.
Linux OS is portable and it can be executed in different hard drives.Unix OS is not portable.
Linux primarily uses GUI with an optional Command Line Interface (CLI).Unix uses the Command Line Interface (CLI).
It supported file system – Ext2, Ext3, Ext4, Jfs, Xfs, FAT, FAT 32, NTFS etc.It supported file system – Jfs, Gpfs, Hfs, Xfs, Zfs etc.
Example – RedHat, Ubuntu, Debian etc.Example – Solaris, All Linux etc.

Q 8. What is the difference between Linux and Windows?
Ans: –

Linux is Open Source, the complete source code for Linux is available.Source code for windows is not available.
Linux is a GPL-licensed operating system; you are free to modify that software and use it and even republish or sell it.ou can only modify or
redistribute Windows operating system.
It is free for every user.It is not free, you can purchase it.
It downloads once and installs it on OS many PC you want.In Windows, you are bounded to use one license on one PC only. If you have to install it on another PC you need another license.
It’s a Secure virus free.It needs Malware protection.
Its Hardware cost is Low.Its Hardware cost increased with every new version.
Linux community version offers online support for free.It’s paid to help desk support.

Q 9. Write some of popular Linux Distributors?
Ans: –

• RedHat: –
It is used to be commercially and it usually provides a stable platform for a long time.

• Ubuntu Linux: –
It is popular among home users. It provides a graphical Linux desktop interface without any need to access the command line. It is very easy to use.

• Debian: –
It is the most stable, quicker, and user-friendly Linux distributor. An example for Debian is Kali Linux.

• Arch Linux: –
It is supported X86-64 hardware architecture. Every package is to be installed by you and it is not suitable for beginners.

• Slacware Linux: –
It is one of the oldest distributions of Linux.

• Linux Mint: –
It works on Windows and it should be used by newcomers.

• BOSS (Bharat Operating System Solution): –
It is a GNU base Linux and is developed in India by C – DAC (Center for Development of Advanced Computing) Chennai. It is used to be Desktop PCs of Government of India employees.

Q 10. What is Linux Kernel? Is it legal to edit Linux Kernel?
Ans: –
Kernel is the core part of Linux. It acts as a bridge between software and hardware. If software requests the hardware, then Kernel delivers the data between software and hardware.
Example: – You want to see a video, you should to play your default video player, it requests to the kernel, and Kernel will connect to the required Hardware and give permission to play the video.

Yes, the Kernel can edit, because it is released under General Public License (GPL). Any project under GPL can be modified and edited by the users.

Linux Interview Questions and Answers for Beginners

Q 11. What are the basic components of Linux?
Ans: –

• Kernel: –
It is the core component of Linux and it works as an interface between software and hardware.

• Shell: –
It acts as an interface between the user and the Kernel.

• GUI: –
It stands for Graphical User Interface. It is another way for users to interact with the system. But unlike CLI, GUI consists of Images, Buttons, TextBoxes for communication to the system.

• System Utilities: –
These are the software function that allows the user to manage the system.

• Application Programs: –
Software programs or a set of functions are designed to perform a set of tasks.

Q 12. What is CLI?
Ans: –
CLI stands for Command Line Interface. It is a way to users to interface with the computer. The users use text lines and the interface accepts the text line and converts them as a suitable command to the operating system.

Q 13. What is GUI?
Ans: –
GUI stands for Graphical User Interface. GUI is user-friendly because it consists of the usage of images and icons. These images and icons are clicked and easily users can communicate with the system.

Q 14. What is LILO?
Ans: –
LILO stands for LInux LOader. It is a Boot loader that is used for the Linux operating system. Most of the Linux operating systems uses LILO, to boot the operating System into main memory to start the system (PC). It as well as MBR in Windows OS.

Q 15. What is Shell?
Ans: –
Shell is a computer program which acts as an interface between the user and the Kernel. Here, users can communicate with the Kernel by typing commands because of it convert user command into Kernel understandable language.

Q 16. How many types of Shell are there in Linux?
Ans: –
There are 5 shells in Linux –

• C Shell (csh): –
It is like C syntax and provides spelling checking and job control.

• Bourne Again Shell (Bsh): –
It is the default shell for most of the Linux distributions.

• Korn Shell: –
It is a high-level programming language shell.

• Z Shell (Zsh): –
It provides some unique features like filename generation, startup files, login/ logout watching etc.

• Friendly Interactive Shell (Fish): –
It provides web-based configuration, auto-suggestion etc.

Q 17. What is Bash (Bsh) Shell?
Ans: –
Bash is a free shell for Unix or Linux. It is the default shell for most Unix system. It has a combination of the C and Korn shell features. It is allows to users to write commands and cause action. Bash is capable of reading commands from shell scripts.

Q 18. What is the different between BASH and DOS?
Ans: –

BASH commands are case-sensitive.DOS commands are not case-sensitive.
‘/’ (forward slash) is used as a directory separator,
‘\’ (backslash) is used as an escape character.
‘/’ (forward slash) is used as a command argument delimiter,
‘\’ (backslash) is used as a directory separator.
Here is no file naming convention.File naming convention includes an 8-character file name followed by a dot and 3 characters for the extension.

Q 19. Write some directory structure of Linux or Unix and their function?
Ans: –

• ”/” (root): –
It is also known as root directory. It is a top-level directory/ folder in Linux and Unix systems. All the system comes under this directory directly or indirectly. The file system is store in the ”root” folder.

• /root: –
It is the default home directory of the root user. In Linux/ Unix the Administrator is called as root. It always comes under ”/” (root).

• /home: –
It contains the home directories of all users. When any user logs in the current working directory by default is store in the user’s home directory.

• /boot: –
All boot-related information store here. It mainly contains the Kernel. It also contains the bootloader example GRUB (Grand Unified Bootloader).

• /usr: –
It is Unix/ Linux system resource. It is used to store all the first party installed software in Linux or Unix. It production server is always indirectly dependent on ”/” (root).

• /opt: –
It stands for Optional. It is used to store all the third-party installed software in Linux or Unix. In the production server, it is always indirectly dependent on ”/” (root).

• /bin: –
It stands for Binary. It is used to store all the normal commands in Linux or Unix systems. It always directly comes under ”/” (root). From RHEL 7 this subfolder is present under /usr.

• /sbin: –
It stands for System Binary. It is used to store all the admin command in Linux or Unix system. It always directly comes under ”/” (root). From RHEL 7 this subfolder is present under /usr.

• /var: –
It stands for Variable. It is used to hold all the log files or events. It is used to hold all the mailboxes of the user. It is one of the ideal locations to make a Linux system as a network installation server (Kickstart).

• /dev: –
It stands for Device. It contains information about all hardware devices. It is used to hold two types of devices in Linux or Unix. They are –

i) Bloack Device: –
The device that are used to store data.
Example – HDD, CD, DVD, Pen-drive etc.

ii) Character Device: –
The device that are used to flow data.
Example – Modem, any kind of port like USB, Serial-Parallel etc.

• /etc: –
It stands for et-Cetra. It is used to hold all the configuration file or administrative file in Linux or Unix systems. It always comes directly under ”/” (root).

• /tmp: –
It is used to hold all the internet uploads and downloads by the user. Every user has full control but no one will be able to edit or delete other contains. In the production environment, it always indirectly dependent on ”/” (root).

• /media: –
It is used to mount for removable media such as CD-ROM, DVD, and Pen-drives.

• /mnt: –
It is used to mount for non-removable drive.

• /proc: –
It shows the system kernel. It is file system is virtual. Its data is Floating.

• /sys: –
Its file system is virtual. It shows the OS activity. Its data is Floating.

• /lib: –
All the 32-bit installed models go under ”/” (root).

• /lib 64: –
All the 64-bit installed models go under ”/” (root).

Q 20. What is Root account?
Ans: –
The root account is like a system administrator account. It provides you full control of the system. You can credit and maintain users accounts, assigning different permission for each account etc. It is the default account every time you install Linux.

Q 21. What do you mean by a Super User?
Ans: –
An Admin while giving permission to the user usually give normal access permission but few of the user having special permission then normal user, they are called Super User.

Q 22. What is Swap Space?
Ans: –
Swap is virtual memory. Swap space is the amount of physical memory that is allocated for use by Linux to hold some concurrent running programs temporarily. It is used when RAM does not have enough space to hold all programs that are executing.

Q 23. What is a typical size for a swap partition under a Linux system?
Ans: –
The preferred size for a swap partition is twice the amount of physical RAM available in the system. If this is not possible, then the minimum size is to be the same as the amount of RAM installed.

Q 24. What is Virtual Desktop?
Ans: –
Virtual Desktop is a feature that allows users to use the desktop beyond the physical limits of the screen. It is basically virtual desktop creates a virtual screen to expend the limitation of the normal screen.

There are two ways to create a virtual desktop –

1) Switching Desktops.
2) Oversized Desktops.

Q 25. What are the types of Linux Desktop environments?
Ans: –
Red Hat Enterprise or Cent OS Linux provides 2 types of desktop environments –

GNOME (GNU Network Object Model Environment): –
It is the default desktop environment for RHEL on GTK+ (graphical toolkit).

KDE (K-type Desktop Environment): –
It is a Windows-based desktop on Qt3 (graphical toolkit).

Q 26. Explain the file Ownership types in Linux?
Ans: –
There are 3 types of Owner in Linux –

Owner: –
A user is the owner of the file by default the person who created the file becomes its Owner.

Group: –
These permissions apply only to the group, that has been assigned to the file or directory.

Others (All): –
These permissions are applied to all users on the system.

Q 27. Explain the file permission types in Linux?
Ans: –
Every file or directory has 3 permission –

Read: –
This permission allows you only open and read the file.

Write: –
This permission allows you to modify the file, adding, removing and renaming the file stored in the directory.

Execute: –
User can access and run the file in a directory.

Q 28. What is a File system in Linux?
Ans: –
Linux file system stores and handles the data. Without a file system, it cannot know where the file starts from and where the files ends.
Example – Ext, Ext1, Ext2, Ext3, Ext4, Jfs, Xfs, Ntfs, Swap ets.

Q 29. What is the default file system in Linux?
Ans: – Xfs.

Q 30. What is the inode and process id?
Ans: –
Each file is given a unique name by the operating system which is called as the inode. Similarly, Process id is the unique id given to each process.

Q 31. What is grub?
Ans: –
It is full from Gram Unified Boot Loader. It is a boot loader file in Linux.

Q 32. What is Initrd?
Ans: –
It’s full from Initial RAM Disk. It is the core part of Linux. It is an image file that store all the installed model, supply those models to Kernel during booting. so that Kernel can starts it activity.

Q 33. What is the name of the popular office suite is available free for both Microsoft and Linux?
Ans: –
Open Office Suite.

Q 34. What is the maximum length for a filename in Linux?
Ans: –
255 characters.

Q 35. What is Daemons?
Ans: –
A Daemon is a computer program that runs as a background process that accepts the requests for service from another computers, most of the operating systems use Daemons in other forms.

Q 36. What is SELinux?
Ans: –
It’s full from Security Enhanced Linux. It’s start from RHEL-4 and it’s developed by the NSA (National Security Agency) of the US Government. It is one type of firewall in Linux to block a particular service in a protocol.

Q 37. What is GNUPG?
Ans: –
It’s full from GNU Privacy Guard. It’s a File encryption technology.

Q 38. What is LUKS?
Ans: –
It’s full from Linux Unified Key Setup. It’s a Drive and System Encryption technology. It’s same as Windows Bit Locker.

Q 39. What is PSEUDO NFS?
Ans: –
It’s a very secure system to file sharing.

Q 40. What is Samba?
Ans: –
Samba is a popular freeware program that is used to connect Linux machines to Microsoft windows network resources like file, printers and other commonly shared resources.

Linux Interview Questions Commands

Q 41. What is YUM?
Ans: –
YUM stands for Yellow dog Updater Modified because it is based on YUP, the Yellow dog Updater. Yellow dog is a version of Linux for the Power architecture hardware and is RPM-based. It is a concept of package management. YUP and later YUM, were written by the Linux community as a way to maintain an RPM-based system.

Q 42. What is RPM?
Ans: –
It’s full from Red Hat Packet Management. RHEL-6 My SQL but after RHEL – 6 its name changes to MariaDB.

Q 43. What is the default text editor in Linux?
Ans: –
VI editor. It can be used to edit any ASCII text.

Q 44. What is the different between Chmod and Chown?
Ans: –
Chmod change the file/ directory permission. The Chown to change the ownership of a file or directory and ownership away to someone else.

Q 45. What is the command restart the Linux system?
Ans: –
#systemctl restart network.

Q 46. How many primary partitions are created by default in Linux?
Ans: –

Q 47. What is Crontab?
Ans: –
Cron is a scheduler that executes the commands at a regular interval as per the specific data and time defined. We have multiple users in Linux and ll the users can have their crontab separately. The crontabs files are saved at a particular location that is /var/spool/cron.

Q 48. What is the different between YUM and rpm?
Ans: –
rpm need local rpm file and dependencies. YUM need repository (collection of rpm) local or internet.

Q 49. What is NFS?
Ans: –
NFS stands for Network File System. NFS enables file systems physically residing on one computer system to be used by other computers in the network, operating to users on the remote host as just another local disk.

Q 50. What is Kickstart?
Ans: –
Kickstart is a process for user to automated a Red Hat Enterprise Linux installation. By using Kickstart you can s single server system to installed Linux on multiple machine.

Q 51. What is Anoconda?
Ans: –
Anaconda is a boot loader used for system for Fedora, Red Hat Enterprise Linux and some other distributors.

Linux Interview Questions and Answers PDF

Also Read: –
Top 160 Networking Interview Questions & Answers
Top 115 CCNA Interview Questions & Answers
Top 60 Linux System Administrator Interview Questions
Computer basic Troubleshooting Interview Questions with Answers
Computer Hardware MCQ Questions & Answers
Cisco Router ports Function
Cisco Router ports Function
VLAN trunking protocol-vtp
VLAN in network
Computer network switching function technics mode
Cisco router, ports, function

Conclusion: –
This blog has covered almost all the Linux-related Interview Questions & Answers. I hope you are understanding all your query. Good luck for your interview.

Leave a Reply