Linux Interview Questions and Answers, Linux Interview Questions and Answers Freshers, Linux Interview Questions and Answers, Linux Interview Questions
Before getting on to the Linux interview questions, the student must know that the Linux is a continuously varying field which needs the students as well as professionals to upgrade their skills with the new features and knowledge, to get fit for the jobs associated with Linux. This post related to Linux Interview Questions and Answers, Linux Interview Questions and Answers Freshers, Linux Interview Questions and Answers, Linux Interview Questions will help you let out find all the solutions that are frequently asked in you upcoming Linux interview.
Over thousands of vacancies available for the Linux developers, experts must be acquaintance with all the component of Linux technologies. This is necessary for the students in order to have in-depth knowledge of the subject so that they can have best employment opportunities in the future. Knowing every little detail about Linux is the best approach to solve the problems linked with problem.
APTRON has spent hours and hours in researching about the Linux Interview Questions and Answers, Linux Interview Questions and Answers Freshers, Linux Interview Questions and Answers, Linux Interview Questions that you might encounter in your upcoming interview. All these questions will alone help you to crack the interview and make you the best among all your competitors.
First of all, let us tell you about how the Linux technology is evolving in today’s world and how demanding it is in the upcoming years. In fact, according to one study, most of the companies and businesses have moved to the Linux. Now, you cannot predict how huge the future is going to be for the people experienced in the related technologies.
Hence, if you are looking for boosting up your profile and securing your future, Linux will help you in reaching the zenith of your career. Apart from this, you would also have a lot of opportunities as a fresher.
These questions alone are omnipotent. Read and re-read the questions and their solutions to get accustomed to what you will be asked in the interview. These Linux interview questions and answers will also help you on your way to mastering the skills and will take you to the giant world where worldwide and local businesses, huge or medium, are picking up the best and quality Linux professionals.
This ultimate list of best Linux interview questions will ride you through the quick knowledge of the subject and topics like Standalone Machine, Network file system (NFS), FTP. This Linux interview questions and answers can be your next gateway to your next job as a Linux expert.
These are very Basic Linux Interview Questions and Answers for freshers and experienced both.
Q1: What do you understand by Linux Kernal? Is it legal to edit it?
A1: ‘Kernal’ basically refers to that core component of the computer operating system that provides basic services for the other parts as well as interacts with user commands. When it comes to ‘Linux Kernal’, it is referred as low-level system software providing an interface for user-level interactions.
Linux Kernal is considered as free and open source software which is capable of managing hardware resources for the users. As it is released under General Public Licence (GPL), it becomes legal for anyone to edit it.
Q2: Differentiate between LINUX and UNIX?
A2: Although there are multiple differences between LINUX and UNIX, enlisted below table covers all the major differences.
LINUX | UNIX |
LINUX is an open source software development and free operating system used for computer hardware & software, game development, PCs, etc. | UNIX is an operating system which is basically used in Intel, HP, internet servers, etc. |
LINUX has priced as well as freely distributed and downloaded versions. | Different versions/flavours of UNIX have different price structures. |
Users of this operating system could be anyone including home users, developers, etc. | This operating system was basically developed for mainframes, servers and workstations except for OSX which is designed such that it can be used by anyone. |
File support system includes Ext2, Ext3, Ext4, Jfs, Xfs, Btrfs, FAT, etc. | File support system includes jfs, gpfs, hfs, etc. |
BASH (Bourne Again Shell) is the Linux default shell i.e. text mode interface which supports multiple command interpreters. | Bourne shell serves as the text mode interface which is now compatible with many others including BASH. |
LINUX provides two GUIs, KDE and Gnome. | Common desktop environment was created which serves as a GUI for UNIX. |
Examples: Red Hat, Fedora, Ubuntu, Debian, etc. | Examples: Solaris, All Linux |
It provides higher security and has about 60-100 viruses listed till date. | It is also highly secured and has about 85-120 viruses listed till date. |
Q3: Enlist the basic components of LINUX?
A3: Linux operating system basically consists of 3 components which are enlisted below
- Kernel: This is considered as the core part and is responsible for all major activities of Linux operating system. Linux Kernel is considered as free and open source software which is capable of managing hardware resources for the users. It consists of various modules and interacts directly with the underlying hardware.
- System Library: Most of the functionalities of the operating system are implemented by System Libraries. These act as a special function using which application programs accesses Kernel’s features.
- System Utility: These programs are responsible for performing specialized, individual level tasks.
Q4: Why we use LINUX?
A4: LINUX is used widely because it is completely different from other operating systems where every aspect comes with something extra i.e. some additional features. Some of the major reasons to use LINUX are listed below
- It is an open source operating system where programmers get the advantage of designing their own custom OS
- Software and the server licensing required to install Linux is completely free and can be installed on many computers as required
- It has low or minimum but controllable issues with viruses, malware, etc
It is highly secured and supports multiple file systems
Q5: Enlist the features of Linux operating system?
A5: Following are some important features of LINUX operating system
- Linux kernel and application programs can be installed on any kind of hardware platform and thus is considered as portable.
- It serves the purpose of multitasking by serving various functions simultaneously.
- It provides the security services in three ways namely, Authentication, Authorization, and Encryption.
- It supports multiple users to access the same system resource but by using different terminals for operation.
- Linux provides hierarchical file system and its code is freely available to all.
- It has its own application support (to download and install applications) and customized keyboards.
- Linux distros provide live CD/USB to their users for installation.
Q6: Explain LILO?
A6: LILO (Linux Loader) is the boot loader for Linux operating system to load it into the main memory so that it can begin its operations. Bootloader here is a small program that manages a dual boot. LILO resides in MBR (Master Boot Record).
Its major advantage is that it allows the fast bootup of Linux when installing in the MBR.
Its limitation lies in the fact that it is not possible for all computers to tolerate modification of MBR.
Q7: What are the basic components of Linux?
A7: Just like any other typical operating system, Linux has all of these components: kernel, shells and GUIs, system utilities, and application program. What makes Linux advantageous over other operating system is that every aspect comes with additional features and all codes for these are downloadable for free.
Q8: Does it help for a Linux system to have multiple desktop environments installed?
A8: In general, one desktop environment, like KDE or Gnome, is good enough to operate without issues. It’s all a matter of preference for the user, although the system allows switching from one environment to another. Some programs will work on one environment and not work on the other, so it could also be considered a factor in selecting which environment to use.
Q9: What is the basic difference between BASH and DOS?
A9: The key differences between the BASH and DOS console lies in 3 areas:
– BASH commands are case sensitive while DOS commands are not;
– under BASH, / character is a directory separator and \ acts as an escape character. Under DOS, / serves as a command argument delimiter and \ is the directory separator
– DOS follows a convention in naming files, which is 8 character file name followed by a dot and 3 character for the extension. BASH follows no such convention.
Q10: What is the importance of the GNU project?
A10: This so-called Free software movement allows several advantages, such as the freedom to run programs for any purpose and freedom to study and modify a program to your needs. It also allows you to redistribute copies of a software to other people, as well as freedom to improve software and have it released to the public.
Q11: Describe the root account.
A11: The root account is like a systems administrator account, and allows you full control of the system. Here you can create and maintain user accounts, assigning different permissions for each account. It is the default account every time you install Linux.
Q12: What is CLI?
A12: CLI is short for Command Line Interface. This interface allows user to type declarative commands to instruct the computer to perform operations. CLI offers an advantage in that there is greater flexibility. However, other users who are already accustom with using GUI find it difficult to remember commands including attributes that come with it.
Q13: Which daemon tracks events on your system?
A13: The syslogd daemon tracks the system information and saves it to specified log files.
Q14: Which command would you use if you want to remove the password assigned to a group?
A14: – gpasswd – r removes the password from the group.
– Here, the gpasswd changes the password of the group and when it is accompanied by –r, the password gets removed.
Q15: You wish to print a file ‘draft’ with 60 lines to a page. What command would you use?
A15: – The command that I would use is: pr -l60 draft
– The default page length when using pr is 66 lines.
– The -l option specifies a different length.
Q16: Which file would you examine to determine the levels of messages written to system log files?
A16: – kernel.h
Q17: You are logged on as a regular user. Without logging off and logging on as root, you are required to create a new user account immediately. How would you do it?
A17: – This can be achieved by issuing the su command.
– This will prompt you for the password of the root account.
– Providing the password, logs you in as root. Now, you can perform any administrative duties.
Q18: You are required to restore the file memo.ben. It was backed up in the tar file MyBackup.tar. Which command would you use to do it?
A18: – The command that we would use is: tar xf MyBackup.tar memo.ben
– It uses the x switch to extract a file.
Q19: How to reduce or shrink the size of LVM partition?
A19: Below are the logical steps to reduce size of LVM partition :
- Unmount the filesystem using unmount command,
- Use resize2fs command , e.g resiz2fs /dev/mapper/myvg-mylv 10G
- Now use the lvreduce command as lvreduce -L 10G /dev/mapper/myvg-mylv
The above Command will shrink the size LVM partition and fixes the filesystem size to 10GB.Most in-depth, industry-led curriculum in linux.
Q20: What are the different modes of Network bonding in Linux?
A20: Below are list of modes used in Network Bonding :
- balance-rr or 0 – round-robin mode for fault tolerance and load balancing.
- active-backup or 1 – Sets active-backup mode for fault tolerance.
- balance-xor or 2 – Sets an XOR (exclusive-or) mode for fault tolerance and load balancing.
- broadcast or 3 – Sets a broadcast mode for fault tolerance. All transmissions are sent on all slave interfaces.
- 802.3ad or 4 – Sets an IEEE 802.3ad dynamic link aggregation mode. Creates aggregation groups that share the same speed & duplex settings.
- balance-tlb or 5 – Sets a Transmit Load Balancing (TLB) mode for fault tolerance & load balancing.
- balance-alb or 6 – Sets an Active Load Balancing (ALB) mode for fault tolerance & load balancing.
Q21: How to check and verify the status of the bond interface?
A21: Using the command ‘cat /proc/net/bonding/bond0,’ we can check what mode is enabled and what LAN cards are used in this bond. In this example, we have one one bond interface. However, we can have multiple bond interfaces like bond1, bond2 and so on.
Q22: How can you enhance the security of password file?
A22: Linux keep user account information in a text file called /etc/passwd. This file also stores one way encrypted password. It is accessed by several tools to get user information, which is a security risk, so file need to ‘Word Readable.’ To minimize the security risk, you can use shadow password format. This method saves account information in regular file /etc/passwd.
However, the password is stored as a single “x” character (not actually stored in this file). A second file, called “/etc/shadow” contains encrypted password as well as other information such as account or password expiration values, etc. The /etc/shadow file is readable only by the root account and is therefore less of a security risk
Q23: What is SMTP?
A23: SMTP stands for Simple Mail Transfer Protocol. It is an internet standard for mail transmission.
Q24: What is Samba? Why is it used?
A24: Samba service is used to connect Linux machines to Microsoft network resources by providing Microsoft SMB support.
Q25: What are the basic commands for user management?
A25:
- last,
- chage,
- chsh,
- lsof,
- chown,
- chmod,
- useradd,
- userdel,
- newusers etc.
Q26: What is the maximum length for a file name in Linux?
A26: 255 characters.
Q27: Is Linux Operating system virus free?
A27: No, There is no operating system till date that is virus free but Linux is known to have less number of viruses.
Q28: Which partition stores the system configuration files in Linux system?
A28: /stc partition.
Q29: How do you kill program using one port in Linux?
A29: Use this command to kills the program using one port: sudo fuser -k 8000/tcp
Q30: How do you get full path of a file in Linux?
A30: Use this command: readlink -f file.txt
Q31: How do you list contents of tar.gz and extract only one file?
A31: Use these commands:
tar tf file.tgz
tar xf file.tgz filename
Q32: How do you find who is logged in?
A32: Use this command to find who logged in: w
Q33: How do you check permissions of each directory to a file?
A33: It is useful to detect permissions errors, for example when configuring a web server.
namei -l /path/to/file.txt
Q34: How do you run command every time a file is modified?
A34: Use this command to do:
while inotifywait -e close_write document.tex
do
make
done
Q35: How to copy text to clipboard?
A35: Use this command: cat file.txt | xclip -selection clipboard
Q36: How do you check resources usage?
A36: Use this command to check resource usage: /usr/bin/time -v ls
Q37: How do you run a command for a limited time?
A37: Use this command: timeout 10s ./script.sh
# Restart every 30 minutes
while true; do timeout 30m ./script.sh; done
Linux Conclusion Interview FAQs
We know the list of Linux Interview Questions and Answers, Linux Interview Questions and Answers Freshers, Linux Interview Questions and Answers, Linux Interview Questions is overwhelming but the advantages of reading all the questions will maximize your potential and help you crack the interview. The surprising fact is that this Linux interview questions and answers post covers all the basic of the Linux technology and you have to check out the FAQs of different components of Linux too.
However, you will be asked with the questions in the interview related to the above mentioned questions. Preparing and understanding all the concept of Linux technology will help you strengthen the other little information around the topic.
After preparing these interview questions, we recommend you to go for a mock interview before facing the real one. You can take the help of your friend or a Linux expert to find the loop holes in your skills and knowledge. Moreover, this will also allow you in practicing and improving the communication skill which plays a vital role in getting placed and grabbing high salaries.
Remember, in the interview, the company or the business or you can say the examiner often checks your basic knowledge of the subject. If your basics is covered and strengthened, you can have the job of your dream. The industry experts understand that if the foundation of the student is already made up, it is easy for the company to educate the employ towards advance skills. If there are no basics, there is no meaning of having learnt the subject.
Therefore, it’s never too late to edge all the basics of any technology. If you think that you’ve not acquired the enough skills, you can join our upcoming batch of Linux Training in Noida. We are one of the best institute for Linux in noida which provide advance learning in the field of Linux Course. We’ve highly qualified professionals working with us and promise top quality education to the students.
We hope that you enjoyed reading Linux Interview Questions and Answers, Linux Interview Questions and Answers Freshers, Linux Interview Questions and Answers, Linux Interview Questions and all the FAQs associated with the interview. Do not forget to revise all the Linux interview questions and answers before going for the Linux interview. In addition to this, if you’ve any doubt or query associated with Linux, you can contact us anytime. We will be happy to help you out at our earliest convenience. At last, we wish you all the best for your upcoming interview on Linux Technology.