An Overview of Linux
A genuinely free and open source operating system, Linux is one of the most liked operating systems. It was designed keeping in mind the Unix compatibility. Read our detailed Linux interview questions to know more about the features and commands of Linux. Usually, it is called as the clone of Unix.
There are 3 main components in Linux
- Kernel, which communicates with the users and the underlying hardware;
- System library, which is a collection of functions and programs that contain almost all the functionalities of an operating system. Users can access the kernel’s features using these library functions;
- System utility, which is a set of programs that do individual, specialized tasks
Check out all the Linux interview questions to understand how Linux is a more improved version of Unix.
Advantages of Linux
- Linux is open source. Hence there are several distributions available to the end user. Example – Ubuntu, Mint.
- By making the code available to everyone, security issues are caught by experts before the versions are released to the public, hence offering higher security.
- Linux can be installed on any hardware without any hassle.
- Highly customizable and flexible because of the availability of source code.
- Provides good networking support using many commands. (Read more about this in our set of Linux interview questions)
- Has good support and documentation.
The latest version of Linux is Debian 9.3 released on December 9, 2017.
Linux was developed by Linus Torvalds. While working on the Unix OS, he felt the need to improve Unix, but the designers of Unix rejected his suggestions. Hence, he founded the Linux in 1991 as a kernel first, which was later launched as a full-fledged OS.
Linux Interview Questions and answers
- How to stop a process running in Linux?
- What is Linux and why it is used?
- What is the difference between Linux and Redhat?
- What does Swap mean in Linux?
- What are the essential features of the Linux operating system?
- How is Linux more secure compared to other operating systems?
- What is the structure of Linux?
- What are the functions of a Linux operating system?
- What are the core components of Linux?
- What is the virtual desktop in Linux?
- How do I get to a command prompt in Linux?
- How do I run a file in Linux?
- How do I check hard drive space on Linux?
- What is Lilo how is it useful in Linux?
- What is export Ld_library_path?
- What do you mean by ldconfig in Linux?
- What is GUI in Linux?
- What is puppet used for in Linux?
- How to enhance the security of password file in Linux?
- What is the use of a symbolic link in Linux?
- Compare cron and anacron in Linux with an example?
- What is a daemon process in Linux?
- What is the difference between filesystems ext2, ext3 and ext4 in Linux?
- List 10 networking and troubleshooting commands in Linux?
- How to give permission to full permission in Linux?
- list the different modes of using vi editor in Linux?
- How to Uninstall Software with the Command Line in Linux?
- What are system calls in Linux?
- Which command in Linux is used for the description of any command?
- How many types of bond are there in Linux?
Looking for a new job? Do not miss to read our Linux Interview Questions and answers. Whether you are a fresher or an experienced, these questions and answers that can help you to crack your interview.
An open-source operating system, Linux is currently one of the best OSs. It can be considered as software that sits underneath and communicates with the other software on a computer and passes on requests from those software programs to the hardware.
Linux is used because it is –
- Highly stable and secure
- Can be maintained easily
- Can run on any hardware system
- Open source and free to use
- Extensive documentation and support
|1.||Specific distribution backed by the company RedHat||General term for the Linux OS. Can refer to any distribution.|
|2.||RedHat is a specific OS built on Linux Kernel.||Linux is essentially a kernel.|
|3.||To receive support and updates, one needs to have a proper agreement with the company.||Follows the Open source model|
- Multi-tasking is possible without slowing down CPU.
- Offers high security compared to other OSs like Windows, iOS, etc.
- Can be converted from the command line to GUI by installing required packages.
- Open source code with great community and support.
- Can run on different hardware types.
- Hierarchical file system.
Read details about the security features of Linux in the next question of our Linux Interview questions list.
There are multiple reasons for this –
- Linux gives very low access to its users. If there is a virus attack, only a few files will be corrupted not the whole system.
- It is less vulnerable because a user needs complete execution rights for opening even an email attachment.
- The working environment in Linux is segmented in different environments like Ubuntu, Arch, Linux Mint, etc. This division gives much protection from the virus.
- Linux uses Iptables which requires advanced privileges to function.
Linux has a layered structure –
Standard Utility library
The standard library of procedures
- Hardware - the CPU, RAM, mouse, the keyboard is the hardware
- Kernel - contains device drivers and handles resource allocation, acts as an interface between the hardware and the operating system.
- The standard library of procedures – termed as libc, allows the user to communicate with the kernel.
- User applications and standard utilities – the commands for various tasks like computing, modifying files or taking backups, etc.
Idconfig is a command that creates the required links and cache to the most recently shared libraries that are present in the directories specified in the
- command line,
- the file /etc/ld.so.conf,
- the trusted directories /lib and /usr/lib
Puppet is a Configuration Management tool. It is used to
- Deploy, configure and manage servers,
- Define and monitor unique configurations for each host
- Scale-up and scale-down machines dynamically
- Provide control over configured devices to propagate changes in a centralized manner
For enhanced security, a shadow copy of the password file is made, which stores hashed passwords of all the users. The hashed password is a long string of characters, generated based on the hashing method used.
Read further for more questions on security in our list of Linux interview questions.
|1.||It is a daemon that runs scheduled tasks||It runs commands periodically, the frequency being defined in several days.|
|2.||Example – updates, system backups||Example – a backup script that is scheduled to run weekly or monthly.|
|3.||Suitable for machines that are on 24x7 like servers||Suitable for machines like laptops and desktops that are NOT on 24x7.|
|4.||Runs as per defined schedules.||Checks if any job has to be executed when the user turns on the power.|
|5.||Default system crontab file is /etc/crontab||Listed in /etc/anacrontab|
|1.||ext2||Second extended filesystem.|
|2.||ext3||The concept of journaling was introduced, wherein, if a system crash or power failure occurred, the filesystems that were not saved could be recovered, unlike ext2.|
|3.||ext4||Performance improvements over the ext3 filesystem. Supports huge filesizes.|
- Ifconfig – configure interface parameters of the network.
- dig – performs DNS lookups to display a result obtained from name servers.
- traceroute – prints the route that the packets take to the network host.
- nslookup – queries internet domain name servers.
- telnet – connect destination port if the connection between hosts is working fine
- netstat – reviews each network connection and the open sockets.
- w – writes (prints) current activities and processes by each user.
- scp – secure copy the files from and to another host in the network.
- ifup/ifdown – enable or disable the network interface respectively.
- nmap – checks for the opened port on the server
Use chmod 777 to give full permission to reading, write and execute.
There are three modes – command mode, insert mode and last line or escape mode.
Use the command apt-get as –
apt-get --purge remove [filename]
For this access the individual command’s manual page. For instance, to know the description of
cat command, type
This will display a description of the said command.