Linux Administration

Here we are going to list down the frequently most asked Core Java Interview Questions for professionals. The questions are created and submitted by professionals to help you to ace the job interview.

Q.1 What do you understand about UNIX?
Unix refers to a computer Operating System which is capable of handling activities from multiple users at the same time. The development of Unix begun around 1969 at AT&T Bell Labs by Ken Thompson and Dennis Ritchie. Further, it is used in Internet servers, workstations, and mainframe computers.
Q.2 What is BASH?
BASH stands for Bourne Again Shell which was written by Steve Bourne as a replacement to the original Bourne Shell. This combines all the features from the original version of Bourne Shell, plus additional functions for making it easier and more convenient to use. However, it has been adapted as the default shell for most systems running Linux.
Q.3 What do you know about Linux Kernel?
The Linux Kernel can be considered as a low-level systems software that helps in managing hardware resources for the user. Moreover, it also provides an interface for user-level interaction.
Q.4 What is LILO used for?
LILO is a boot loader for Linux that is used for loading the Linux operating system into the main memory so that it can start its operations.
Q.5 What is a swap space?
Swap space is a definite amount of space used by Linux for temporarily holding some programs that are running concurrently. This takes place when RAM does not have sufficient memory to hold all programs that are executing.
Q.6 What are the benefits of open source?
Open source enables you to distribute your software, including source codes freely to anyone who is interested. Using this, individuals would be able to add features and even debug and resolve errors that are in the source code. Moreover, they can even make it run better and then redistribute these enhanced source code freely again.
Q.7 How to change the default run level?
For changing the default run, firstly, pull up the initial default file to edit it and change the entry to the pathname "id:5:initdefault:". After changing the pathname entry, use the "init" command for changing the run level to the new designation.
Q.8 How can we create an ext4 file system?
Ext4 file system can be created using a single command. The command is: '# mke2fs -t ext4 /dev/DEV'. Enter this into the entry lines and a new file system should open.
Q.9 Can we share a directory using NFS?
For sharing a directory within NFS, the configuration file is required to be edited first. So, firstly, enter a command like " '/ with the specified criteria. After entering the command, restart the NFS service for finalizing the share.
Q.10 Define the /proc file system.
The /proc file system refers to a virtual file system that provides detailed information about Linux Kernel, hardware and running processes. The Files under the /proc directory are named virtual files.
Q.11 What are BASH and DOS commands?
  • Firstly, BASH commands are case sensitive while DOS commands are not.
  • Secondly, in BASH, / character is a directory separator and \ acts as an escape character. Whereas in DOS, / serves as a command argument delimiter and \ is the directory separator.
  • Lastly, DOS follows a convention in naming files, which is 8 character file name followed by a dot and 3 characters for the extension. On the other hand, there is no convention in BASH.
Q.12 What is the GNU project?
This refers to a free software movement that allows several advantages, such as the freedom for running programs for any purpose and freedom for studying and modifying a program to your requirements. Moreover, it enables you to redistribute copies of the software to other people, as well as the liberty of improving the software.
Q.13 What is a root account?
The root account can b considered as a systems administrator account that gives complete control of the system. In this, you can build and maintain user accounts and allocate different permissions for each account. However, this is the default account every time you install Linux.
Q.14 What is the purpose of CLI?
CLI stands for Command Line Interface that allows the user to type declarative commands for instructing the computer to execute operations. Further, this also provides greater flexibility. However, users who are already familiar with using GUI find it hard to remember commands including attributes that come with it.
Q.15 What do you understand about GUI?
GUI stands for Graphical User Interface that offers the use of images and icons that users click and manipulate as a way of communicating with the computer. Rather than remembering and typing commands, the use of graphical elements makes it easier for interacting with the system, as well as adding more attraction through images, icons, and colors.
Q.16 I want to know how much memory Linux is using. How will I do this?
For this, open the command shell and use the "concatenate" command: cat /proc/meminfo for memory usage information. After this, you will see a line starting something like Mem: 64655360, etc. This is the total memory Linux thinks it has available to use.
Q.17 What is DNS?
DNS stands for domain name system which is an Internet service used for translating domain names into IP addresses, domain names. Further, the DNS system is a network as, if one DNS server doesn’t know how to translate a particular domain name, it asks another one, and so on, until the correct IP address is returned.
Q.18 What is FTP?
File Transfer Protocol (FTP) refers to a network protocol used for transferring files from one host or to another host over a TCP-based network like the Internet. However, FTP is a client-server architecture that uses separate control and data connections between the client and the server. Further, the secure transmission with traffic encryption uses SSL/TLS and is called SSH FTP or SFTP.
Q.19 What is Virtualization in Linux?
Virtualization enables multiple operating system instances to run concurrently on a single computer. In other words, separating hardware from a single operating system. Every “guest” OS is managed by a Virtual Machine Monitor (VMM) that is called a hypervisor. Moreover, the virtualization system can control the guests’ use of CPU, memory, and storage, even allowing a guest OS for migrating from one machine to another.
Q.20 Define SMTP.
SMTP stands for Simple Mail Transfer Protocol that is used when the email is delivered from an email client like Outlook Express, to an email server or when the email is delivered from one email server to another. Further, it uses port 25 and can be used by the Mail Transfer Agent (MTA) for delivering email to the recipient’s mail server. Were, the SMTP protocol can only be used for sending emails, not for receiving them.
Q.21 What do you understand about POP3?
POP3 stands for Post Office Protocol that enables an email client to download an email from an email server. Its design concludes that the email client downloads all available emails from the server and deletes them from the server. Moreover, After downloading the messages the internet connection can be removed and emails are read at ease but the user also downloads all messages whether required or not. Further, it uses port 110 and offers a simple, standardized way for users to access mailboxes and download messages.
Q.22 What do you understand about IMAP?
IMAP stands for Internet Message Access Protocol which is used for downloading email from an email server by an email client. However, the IMAP protocol does not delete the email on the server hence, needs more disk space and CPU resources than POP3. Further, this is a client/server protocol in which e-mail is received and held by the server. And, IMAP needs small data transfer so can work over a slow connection. Lastly, when requested to read a defined email message then, it will be downloaded from the server. It uses port 143.
Q.23 What is the process for changing permissions under Linux?
Suppose you are the system administrator or the owner of a file or directory, you can allow permission using the chmod command. Use ‘+’ symbol for adding permission or ‘–’ symbol for denying permission, along with any of the following letters: u (user), g (group), o (others), a (all), r (read), w (write) and x (execute). For example, the command chmod go+rw FILE1.TXT allows read and write access to the file FILE1.TXT, which is allocated to groups and others.
Q.24 What is the process for sharing a program over different virtual desktops under Linux?
For sharing a program over different virtual desktops, in the upper left-hand corner of a program window look for an icon that looks like a pushpin. Click on t this button will "pin" that application in place, making it appear in all virtual desktops, in the same position onscreen.
Q.25 What is a nameless (empty) directory?
This empty directory name can be defined as the nameless base of the Linux file system. This presents as an attachment for all other directories, files, drives, and devices.
Q.26 What are daemons?
Daemons refer to services that provide several functions that may not be available under the base operating system. This performs tasks to listen for service requests and at the same time to take action on these requests. After completing the service, it is then disconnected and waits for further requests.
Q.27 What is the process for moving from one desktop environment to another like moving from KDE to Gnome?
Supposed you have these two environments installed, just log out from the graphical interface. After that, at the login screen, type your login ID and password and select which session type you want to load. This selection will remain your default until you change it to something else.
Q.28 Define the grep command.
Grep refers to a search command that makes use of pattern-based searching. This makes use of options and parameters that are defined along with the command line and applies this pattern in searching for the required file output.
Q.29 Command is giving a different result from the last time it was used. What can be the issue?
This can be a case-sensitivity issue. As Linux is case sensitive, a command that was previously used might have been entered in a different format from the present one. For example, for listing all files in the directory, you type the command ls and not LS. Typing LS will give a different result or can result in an error message if there is no existing program by that exact name.
Q.30 What /usr/local directory?
This contains locally installed files. However, this directory is important in environments where files are stored on the network specifically, locally-installed files go to /usr/local/bin, /usr/local/lib, etc.). Further, this is used for software packages installed from source, or software not officially shipped with the distribution.
Q.31 Explain the process for ending an ongoing process?
Every process in the system is recognized by a unique process id or pid. However, for ending a process, use the kill command followed by the pid. And, for ending all processes at once, use kill 0.
Q.32 Is it possible to execute more than one command or program from a single command line entry?
Yes, you can merge several commands by separating each command or program using a semicolon symbol.
Q.33 I want to color the Git console, how will do it?
For coloring the Git console, you can use the command git config: global color.ui auto. In the command, the color.ui variable sets the default value for a variable like color.diff and color.grep.
Q.34 How to attach one file to another in Linux?
For attacking one file to another in Linux you can use the command cat file2 >> file 1. The operator >> attaches the output of the named file or creates the file if it is not created. While another command cat file 1 file 2 > file 3 attaches two or more files to one.
Q.35 Is it possible to run a Linux program in the background at the same time when you start Linux Server?
Yes, this can be done by using nohup. This will stop the process of receiving the NOHUP signal and thus ending it and you will get logged out of the program which was used with and runs the process in the background.
Q.36 What are hard links?
Hard links are placed directly to the physical file on disk, and not on the pathname. That is to say, if you rename or move the original file, the link will not interrupt since the link is for the file itself and not for the path where the file is located.
Q.37 Can you tell the maximum length for a filename under Linux?
Any filename under Linux can have a maximum of 255 characters. However, this limit does not include the pathname. This means that the whole pathname and filename could well exceed 255 characters.
Q.38 What do you know about environmental variables?
Environmental variables (env) refer to the global settings that control and manage the shell's function as well as that of other Linux programs. However, the common term for environmental variables is global shell variables. Further, they can affect the processes ongoing or the programs that are executed in the environment.
Q.39 What is kernel?
A kernel refers to a central component of an operating system. This acts as an interface between the user applications and the hardware. However, the aim of the kernel is to manage the communication between the software (user-level applications) and the hardware (CPU, disk memory, etc.). The main tasks of the kernel are: Process management Device management Memory management Interrupt handling I/O communication File system
Q.40 Why is there a need for LVM in Java?
LVM is abbreviated for Logical Volume Manager which is used to resize file system’s size online. We require LVM partition in Linux. Such that size of LVM partition can be extended and reduced using the lvextend & lvreduce commands respectively.
Q.41 How can you assess Memory stats and CPU stats ?
We can assess memory stats and CPU stats using ‘free’ & ‘vmstat’ command that can be used display the physical and virtual memory statistics respectively. Also with the help of ‘sar’ command we see the CPU utilization & other stats.
Q.42 What does Sar offer and at which location 'Sar logs' are stored ?
Sar is used to collect, report, or save system activity information. Such that the default version of the sar command (CPU utilization report) is considered as one of the first facilities the user runs to begin system activity investigation, since it monitors major system resources. Note, in case the CPU utilization is somewhere near 100 percent (user + nice + system), the workload sampled is CPU-bound. Also by default the log files of Sar command are located at /var/log/sa/sadd file, wherein the dd parameter indicates the current day.
Q.43 How can you increase the size of LVM partition ?
The steps to be followed to increase the size of LVM partition are -
1. Firstly, we should use the lvextend command (lvextend -L +100M /dev/ , such that here we are extending the size by 100MB.
2. resize2fs /dev/
3. check the size of partition using ‘df -h’ command
Q.44 What are the steps to shrink the size of LVM partition ?
The steps to be followed to shrink the size of LVM partition are -
1. Umount the filesystem using umount command, -use resize2fs command , e.g resiz2fs /dev/mapper/myvg-mylv 10G
2. Now use the lvreduce command , e.g lvreduce -L 10G /dev/mapper/myvg-mylv The above Command will shrink the size of the LVM partition and will make the filesystem size 10GB.
Q.45 Where are the kernel modules located?
‘/lib/modules/kernel-version/’ directory stores all kernel modules or compiled drivers in Linux operating system. Such that with ‘lsmod’ command we can see all the installed kernel modules.
Q.46 What do you understand by umask ?
umask is abbreviated for ‘User file creation mask’, that is used to determine the settings of a mask that controls file permissions that are set for files and directories when they are created.
Q.47 How will you set the umask permanently for a user?
In order to set this value permanently for a user, it has to be put in the appropriate profile file that depends on the default shell of the user.
Q.48 How can you change the default run level in linux ?
In order to change the run level we have to edit the file “/etc/inittab” and change initdefault entry ( id:5:initdefault:). Using ‘init’ command we change the run level temporary like ‘init 3’ , this command will move the system in runlevl 3.
Q.49 How can you share a directory using nfs?
In order to share a directory using nfs, we first need to edit the configuration file ‘/etc/exportfs’ , add a entry like
‘/ (Options)’ and then restart the nfs service.
Q.50 What do you understand by Network Bonding ?
Network bonding refers to the aggregation of multiple Lan cards into a single bonded interface so as to provide fault tolerance and high performance. Network bonding is also referred as NIC Teaming.
Q.51 How can you assess and verify the status the bond interface?
We can assess and verify the status of bonded interface by using the command ‘cat /proc/net/bonding/bond0’, inm order to understand which mode is enabled and what lan cards are used in this bond.
Q.52 How will you check default route and routing table ?
We can check default route and routing table using the Commands ‘netstat -nr’ and ‘route -n’
Q.53 What are the services enabled at a particular run level in linux server ?
We can use the command ‘chkconfig –list | grep 5:on’ to list all the service that are enabled in run level5. Such that for other run levels just replace 5 with the respective run level.
Q.54 How will you upgrade Kernel in Linux ?
One should never upgrade Linux Kernel , whereas install the new kernel using rpm command since upgrading a kenel can make the linux box in a unbootable state.
Q.55 How can you add and change the Kernel parameters?
Steps to add and change the Kernel parameters are -
1. In order to Set the kernel parameters in linux , you must first edit the file ‘/etc/sysctl.conf’
2. After making the changes save the file and run the command ‘sysctl -p’
3. This command will make the changes permanently without rebooting the machine.
Q.56 Define Puppet Server.
Puppet is one of the open-source and enterprise software used for configuration management toll in UNIX like operating system. Puppet is primarily an IT automation software used to push configuration to its clients (puppet agents) using code. Such that the puppet code can do a variety of tasks from installing new software, to check file permissions, or updating user accounts etc.
Q.57 What do you understand by manifests in Puppet ?
Manifests in Puppet are referred the files in which the client configuration is specified.
Q.58 Where will you find WWN numbers of HBA cards in Linux Server ?
We can find the WWN numbers of HBA cards using the command ‘systool -c fc_host -v | grep port_name’
Q.59 What do you understand by load average in Linux ?
Load Average is referred as the average sum of the number of process waiting in the run queue and number of process currently executing over the period of 1,5 and 15 minutes. Such that using the ‘top’ and ‘uptime’ command we find the load average of a Linux sever.
Get Govt. Certified Take Test
 For Support