Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

51.

Share 5 Linux commands you use on a regular basis in your environment?

Answer»

We use several commands in our day to day Linux activities and support. You can also use help or man page for a list of commands and the available options for quick reference. Most basic SAND majorly uses are as below:

  • CD: You can use this command to change your working directory. You can easily reach you your home directly by “CD /” from any working location.
  • PWD: This command displays the full path of your current working directory. Very use full while reviewing different directories during troubleshooting or system analysis.
  • ls: This command displays complete of files and directories in your current working directory. You can additional PARAMETER -l for permission details and -a for hidden or config files. We have lots of option to use with ls commands to have the required output.
  • Mkdir / rmdir: You can use “Mkdir” command to create a new directory and “rmdir”  This command to remove or delete the directory.
  • Su: This is a special command to log in with a SPECIFIC user or switches user from one to the other.
52.

What is the difference between the mail client and the mail server?

Answer»

Email client primarily is a desktop or mobile application that enables users to receive and SEND emails directly on the desktop or mobile. Typically, email client requires an email address to be set up, mail server details & connectivity to the mail server to configure and use email service. These configuration and settings include email address, password, POP3/IMAP and SMTP address, port number, email aliases, and other related preferences.

A mail server or an email server is a server that supports email function in network and support clients to handles and delivers e-mail over a network. This can be over intranet or INTERNET. Email server receives emails from client computers and delivers them to other mail servers after proper authentication and authorization. Mail servers use MTA (Mail TRANSFER agent) with SMTP (Simple Mail Transfer Protocol) to support email transmission. You have used any open source free MTA or any paid version the BASIS of your requirements and security policies.

53.

What are the different types of Shells used in Linux?

Answer»

SHELL is an interpreter which CONVERTS scripts or executables to machine action. Shell prompt is a Command-line interface as WELL as GUI (GRAPHICAL User Interface) that takes inputs from the user and executes selected program according to that. Shell Scripts can be combined in a package for automation and schedule background tasks. Shell Scripts will be saved using EXTENSION .sh and scheduled using corn jobs.

Some majorly known shells as below:

  • sh: sh is known as Bourne Shell (sh). This is the original UNIX shell which has limited functionality. Command path is located at /bin/sh and /sbin/sh.
  • bash: Default shell in most Linux installations and compatible with the legacy sh shell. bash is the short name of Bourne Again Shell. Command path is /bin/bash.
  • ksh: High-level programming language shell known as Korn Shell. Command path is /bin/ksh.
  • Tcsh/csh: Tcsh or csh is also known as C Shell. This works on C language syntax. Command path is / bin/csh.
54.

What is Network Teaming?

Answer»

Network Teaming also is known as Ethernet Channel Bonding that enables two or more Network Interfaces Card (NIC) to work as a single VIRTUAL NIC card. This means the machines will be supposed to work on the virtual one and which may increase the bandwidth and provides redundancy of NIC Cards. This helps us in achieving redundant links, load balancing or fault tolerance networks in the production system. If one physical NIC is down or can say unplugged, it will automatically MOVE the RESOURCES to other NIC card. Channel/NIC bonding works with the help of the bonding driver in KERNEL

2 main types of Network Teaming:-

  1. Load balancing (Round-Robin): In Load balancing, Both network cards are active all the time and dividing the workload for better data transmission. This provides better resource utilization and faster output.
  2. Active-Backup: In Active-Backup: One network card is active at one time and another card will keep passive for backup. In case of active network card FAILURE, Passive card will start behaving as active to fulfil the user request.
55.

Define Linux Kernal and can we modify it?

Answer»

The kernel is the lowest level of SOFTWARE that controls all hardware and communicates with users for functions needs to perform. Linux Kernel is the core of the operating system that provided a user interface to perform user commands and control associated hardware. Linux Kernel is a LAYER that provides the ability to the user to control system hardware, develop applications on the operating system. All underline hardware with the system is communicable though Kernel only. The kernel GIVES you the independence to use software and programming language by your choice, Kernel is capable enough to convert them in machine language to control the required hardware subsystem.

Linux Kernal is free and open-SOURCE software and as per General Public License (GPL), it becomes legal for anyone to edit it.

Open-source software authorized you to distribute software with the source. This privileged people to review and add features as per their requirements. This gives a win-win solution to the complete COMMUNITY.

56.

Briefly explain the process of sending an email?

Answer»

The basic steps of this process are mentioned below for your convenience.

  • Step 1: After composing a message and send, your email client - whether it's Outlook Express or Gmail - connect to the domain's SMTP server. This server can name many things; a STANDARD example would be smtp.local.com.
  • Step 2: In this step, the email client communicates with the SMTP server by giving your email address, the recipient's email address, the message body, and any attachments.
  • Step 3: Now SMTP server has complete details to processes the recipient's email address - ESPECIALLY its domain. If the domain name is the same as the sender's, the message is routed directly over to the domain's POP3 or IMAP server - no routing between servers needed. If the domain is different, though, the SMTP server will have to communicate with the other domain's server.
  • Step 4: To deliver email and to find the recipient's server, the sender's SMTP server has to communicate with the DNS or Domain Name Server. The DNS will take the recipient's email domain name and translates this into an IP address. The sender's server cannot route an email properly with a domain name alone; an IP address is a unique NUMBER that is assigned to every computer that is connected to the Internet. By knowing information, an outgoing mail server can perform its work more efficiently.
  • Step 5: Once SMTP server got the recipient's IP address, it can connect to its SMTP server. This isn't done directly, though; instead, the message is routed along with a series of unrelated SMTP servers until it arrives at its destination.
  • Step 6: The recipient's SMTP server scans the incoming message. If the domain and user name are valid, it forwards the message along to the domain's POP3 or IMAP server. From there, it is placed in a send mail queue until the recipient's email client allows it to downloaded. At that point, the message can READ by the recipient.
57.

List down some of major Linux distributions?

Answer»

LINUX is an open-source operating system which allows USERS to modify kernel as per their requirement. This facilitates the different part of Linux to be deployed, modified and tested by a different organization. This result in multiple flavors of Linux available in the market and each has its own feature.

Major Linux distributions are as below:-

Ubuntu: It’s the most common and well-known distribution. It has lots of ree installed apps for user’s easiness. It’s very easy to USE and available in the COMMAND line and GUI both.

Red Hat Enterprise: Red Hat Enterprise Linux or RHEL is commercial Linux distribution. It stale, tested, user-friendly and most important NOT free to use.

Debian: Debian is one of the fastest and user-friendly Linux version.

Linux Mint: Its a SPECIAL TYPE of distribution works on the windows system as well. This for beginners to get hands-on the Linux system.

Fedora: Fedora is not in use on high numbers due to less stability. It supports a GNOME3 desktop environment by default.

58.

What is the difference between the tar, gz, and zip?

Answer»

Tar & ZIP are TWO most commonly used utilities in Linux system

TAR is archiver utility which will archive the selected files or directories. Extension of TAR is .tar.

GZ is known as gunzip used compress files only. Extension of gz is .gz. You can USE gz on TAR to compression directories achieved by TAR.

ZIP is archiver and compression utility for files and directory. Extension of ZIP is .zip.

The benefit of TAR can be applied on directories. Sometimes, you do not want to compress the FILER but want to bundle them, TAR is perfect for it. TAR with GZIP is the best COMBINATION. Like GZIP, we also have bzip2 which use a completely new algorithm to compress files has given less size in compare to gzip.

59.

What is IRIX Mode in top command?

Answer»

CPU usage percentage is very common confusion in LINUX. Sometimes, User or new SYSTEM ADMINISTRATOR complaint that CPU is SHOWING >100% which is some configuration issues or VM issues. But this is not true.

Linux treats all processors individually and when you RUN top common, it should CPU usage per processor wise. Here, System is not considering all processors as a whole and showing usage of each processor individually which lead to total PU utilization to >100%.

To resolve this confusion, IRIX mode has been introduced. This is the DEFAULT mode of Linux now. In Irix Mode, System considers all processors as a whole and CPU usage can vary from 0 to 100 only. IRIX feature was introduced in Solaris and adopted by Linux later.

60.

What is the numeric and alphabetical method for granting permissions?

Answer»

GRANTING permission on FILES and directories is one of the crucial and data security stuff for Linux System Administrator. Permission on any file or directory is a combination of 9 alphabets. FIRST 3 from the left represents owner access, then middle 3 represents user group access and the last 3 are for other users who are not the owner or part of a group having access.

rwxrwxr

wx

We have several ways to grant permissions using the numeric and alphabetical method. Having knowledge of these shortcuts makes administrators life easy.

rwx = 111 in binary = 7

rw- = 110 in binary = 6

r-x = 101 in binary = 5

r-- = 100 in binary = 4

So when you mention 765 numeric CODE to provide access permission, User will get like:- rwxrw-r-x

61.

Explain Root and it’s significance in the Linux system?

Answer»

The ROOT is the most privileged account in Linux for the system administrator. The root user has you full access to the system to perform all kind of access. The root is default account of Linux, created with Linux installation only. The root user is ALSO known as the Root account or superuser. Due to UNCONTROLLED access of Root account, this account needs to be secured and used crucially and carefully.

Some of the FUNCTIONS can be performed by the Root account:-

  1. The root can create/delete/ modify any user, user group, files, directory and permissions
  2. The root can connect by using any user without password
  3. System / Library / function calls
  4. Managing hidden & CONFIG files
  5. System administrator commands
  6. Etc.
62.

Explain are different process states in Linux?

Answer»

When we execute “ps aux”  in Linux terminal console, we can see multiple states of processes running in the SYSTEM under the STAT column.

R: Process is running with CPU or WAITING for CPU (Running or Runnable)

S: Process is waiting for the set event to complete, Like an input from terminal (SLEEP)

D: Process is with uninterruptible sleep stats which cannot be changed or KILLED \ rollback. The only WAY to go AWAY is the reboot system.

Z: Process in Zombie status means the process is already killed but process information and data still exist in the process table.

T: Process either completed or terminated by the operating system or user. This is also known as Terminated /  Completed.

63.

What is the FTP Server?

Answer»

FTP is the simplest file transfer protocol to exchange files to and from a REMOTE computer or network system. Similar to Windows, Linux, and UNIX operating systems they also have built-in command-line prompts that can be USED as FTP clients to establish FTP connection. FTP works in Client-SERVER architecture to communicate and transfer the file during an established FTP session. 

When the Client initiates a connection to the server, it’s called Passive Connection. Whereas when Server initiates a connection to the client, it’s called Active Connection.

In Phase 1, When Connection initiated with the server, User credentials are passed for AUTHENTICATION. This is the control connection phase. In Phase 2, When actual DATA is transferred between client & server, This is data connection phase.

64.

What is the ctrl+D error?

Answer»

ctrl+D ERROR is one of the common errors occur when the root user TRIES to make any Permanent entry in fstab file & by mistake changes the path location of mounted file systems in os, it gives error while rebooting the system and fails to load.

fstab is a system configuration file on the Linux operating system that contains information about major filesystems. This file is LOCATED in /etc directory and can be viewed LIKE “cat /etc/fstab”.

We have set steps to recovery system from ctrl+D error.

  1. Boot system using bootable CV/DVD of Linux of the current version installed
  2. Read ctrl+D error for the exact issue
  3. Connect using Root User and it will connect you in single-user mode
  4. Access /etc/fstab file and make required changes 
  5. Try NORMAL system reboot
65.

Define cron job and steps to configure a cron job to run every week “At 00:00 on Sunday.”?

Answer»

cron Job is similar to Task Scheduler in WINDOWS. corn is a software utility which schedules a command or script on your SERVER to run automatically at a mentioned time and date. cron jobs can be very useful to automate repetitive tasks according to our need.

For example, we need to delete some temporary files every week to conserve our disk space. Once we have a script in place doing required action, We can set up a cron job to perform a certain action on a specific time. Scripts executed as a cron job are typically used to modify files, directories or databases. However, they can perform other tasks that do not modify data on the server, like sending email notifications.

We need to enter below LINES in crobtab by:

 testmachine@myworld-linux:~$ crontab -e

0 0 * * 0 /path/to/command

Where,

  • 1 => is the Minute (0-59)
  • 2 => is the Hours (0-23)
  • 3 => is the Day (0-31)
  • 4 => is the Month (0-12 [1 == January])
  • 5 => is the Day of the week(0-7 [7 or 0 == sunday])
  • /path/to/command – Script or command NAME want to schedule
66.

Explain /bin, /usr, /sbin, /user/bin and /user/sbin Linux directories?

Answer»

/BIN: Its critical directory used to bring the system online in single-user mode to repair it. This contains executable programs(can SAY scripts) for this.

/sbin: This directory holds commands needed to boot the system in NORMAL condition but not executed or used by normal users.

/usr: This is ONE of the largest directories in the Linux system, mostly mounted from a separate partition. Birnies and files all programs are installed reside here.

/usr/bin: This directory contains programs, executables and scripts not used for boot process but used by users to EXECUTE. Most of the programs or executable executed by users rather than root

/usr/sbin: Program binaries or executables required for a system administrator is kept under this directory. This program binaries or executables are not required for boot process or normal users.

67.

What is Linux Loader?

Answer»

Linux Loader or Linux Boot Loader is also known as LILO, a combination of initial 2 characters of Linux LOader.

LILO loads Linux operating system into MAIN memory to boot system and to start working on it. Multiple operating systems like Windows & Mac OS comes up with their RESPECTIVE boot loaders.  When you install Linux OS, you need to install a special boot loader for it. We have multiple boot loaders available in the market, LILO is one of them.

When the system started, BIOS performs some initial tests and transfers control to the MASTER Boot Record. Now, LILO loads the Linux OS and starts it. The best part of using LILO is that it allows FAST boot of Linux OS.

68.

What does SELinux mean in Linux?

Answer»

SELinux is known as Security-enhanced Linux. In today’s world data is everything, Protecting your server and KEEP is up to server is a major challenge. Linux kernel gives security OPTION of SELinux which is designed to protect the server from misconfigurations and unauthorized data access/modification. It helps in DEFINING policy for accessing PROGRAMS and files.

SELinux comes with 3 modes Enforcing, PERMISSIVE and Disabled.

  1. Enforcing mode: Default mode to enforce the policies on the system, restrict access and log actions.
  2. Permissive mode: Here, SELinux was enabled but does not enforce security policies. This result warning and logging for any restricted access.
  3. Disabled mode: When SELinux is turned off and the security policies do not protect the server.
69.

Explain different file permissions or access modes in Linux?

Answer»

All the files and directories in Linux  have below 3 permissions, represented by a three digit octal VALUE .-

READ - It provides the ABILITY to read the contents of a file (represented by 'r' in the first position "r--")

WRITE - It Provides the ability to edit or delete the CONTENT of a file (represented by 'r' in the second position "-w-")

Execute - It Provides the ability to execute the file (represented by 'x' in the third position "--x")

The octal value is calculated as the sum of the permissions:

“read” is 4

“write” is 2

“execute” is 1

70.

Explain the usage of ps command in Linux with examples ?

Answer»

PS (i.e., process status) command is used to provide information about the CURRENTLY running processes, including their PIDS (process identification numbers). A process is a running  instance of a program. Every process is assigned a unique PID by the.
Example:

$ ps -EF $ ps -ef | grep tomcat
71.

How to check os version in Linux command line ?

Answer»

Type any one of the following command to find os name and version in Linux:

CAT /etc/os-release lsb_release -a  hostnamectl

Example –

% hostnamectl Static hostname: WDFL41000139D ICON name: computer-vm CHASSIS: vm Machine ID: bfc98d9a56631ccde8f8578d58347195 Boot ID: dc39baafe82849b39413507cfd395b54 Virtualization: microsoft Operating System: SUSE Linux Enterprise Server 12 SP2 CPE OS Name: cpe:/o:suse:sles:12:sp2 Kernel: Linux 4.4.121-92.98-default Architecture: x86-64 %lsb_release -a LSB Version: n/a DISTRIBUTOR ID: SUSE Description:  SUSE Linux Enterprise Server 12 SP2 Release:    12.2 Codename:   n/a

Also type the following command to find Linux kernel version:

uname -r