Linux Administrator

100+ Linux Administrator Interview Questions and Answers

Updated 19 Dec 2024

Popular Companies

search-icon

Q1. What is LVM, Explain LVM Architecture, What is Raid, What is the booting process of RHEL, How to manage failed unmount or mount, What are the issues you have faced in working with Linux Servers, What is special...

read more
Ans.

LVM is Logical Volume Manager used for managing disk space, RAID is Redundant Array of Independent Disks for data protection, RHEL boot process involves BIOS, GRUB, kernel loading, and init process.

  • LVM allows for dynamic resizing of logical volumes without downtime.

  • RAID combines multiple disks for data redundancy or performance improvement.

  • RHEL boot process involves BIOS POST, GRUB bootloader, kernel loading, and init process.

  • Managing failed unmount or mount involves checking...read more

Q2. What is lvm, repo, softlink hardlink, NTP, nfs, apache, and linux task related question.

Ans.

This question covers various topics related to Linux administration.

  • LVM (Logical Volume Manager) is a tool used for managing disk space in Linux systems.

  • Repo (Repository) is a collection of software packages that can be installed on a Linux system.

  • Softlink and hardlink are types of links used in Linux file systems to create shortcuts to files or directories.

  • NTP (Network Time Protocol) is used to synchronize the system clock of a Linux machine with a time server.

  • NFS (Network F...read more

Linux Administrator Interview Questions and Answers for Freshers

illustration image

Q3. How to scan if new hard is attached to a system

Ans.

Use 'lsblk' command to scan for new hard drives attached to the system.

  • Open terminal and type 'lsblk' command

  • Check for any new devices listed in the output

  • Alternatively, use 'fdisk -l' command to list all disks and partitions

Q4. How to check Kernel and OS Version, How to change file permissions, Whar are the default permissions of few files, In which file user id and password stored, Network configuration stored in which file, How to f...

read more
Ans.

To check Kernel and OS Version, change file permissions, view default permissions of files, locate user id and password file, find network configuration file, and filter keywords.

  • To check Kernel and OS Version: Use 'uname -a' command

  • To change file permissions: Use 'chmod' command followed by permission code and file name

  • Default permissions of few files: For example, /etc/passwd has 644 permissions

  • User id and password stored in: /etc/passwd file

  • Network configuration stored in:...read more

Are these interview questions helpful?

Q5. what is DNS, what is a raid, how do you optimize disk space, what is LVM, the configuration file of NFS,samba, apache? monitoring error explains and how you resolve it.

Ans.

DNS is a system that translates domain names into IP addresses. RAID is a data storage technology. LVM is a logical volume manager.

  • DNS stands for Domain Name System and is responsible for translating domain names into IP addresses.

  • RAID (Redundant Array of Independent Disks) is a data storage technology that combines multiple physical disks into a single logical unit for improved performance, reliability, or both.

  • To optimize disk space, you can use techniques like compression,...read more

Q6. how we can transfer file from one server to other server?

Ans.

Files can be transferred from one server to another using tools like SCP, SFTP, or rsync.

  • Use SCP (Secure Copy Protocol) to securely transfer files between servers. Example: scp file.txt user@server2:/path/to/directory

  • Use SFTP (SSH File Transfer Protocol) for interactive file transfers. Example: sftp user@server2

  • Use rsync for efficient synchronization of files between servers. Example: rsync -avz file.txt user@server2:/path/to/directory

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. You are unable to unmount a file system, what will you do?

Ans.

Check for any processes or open files using the file system, then force unmount if necessary.

  • Check for any processes or applications currently using the file system with 'lsof' command

  • Kill any processes that are using the file system if necessary

  • Try unmounting the file system again using 'umount -l' to force unmount if needed

Q8. Patching and the process of how I do patching

Ans.

Patching is the process of updating software to fix vulnerabilities and improve performance.

  • Patching involves identifying and applying updates to software systems.

  • It is important to regularly check for patches and updates from vendors.

  • Patching can be done manually or through automated tools.

  • Before applying patches, it is crucial to test them in a controlled environment.

  • Patching should be performed in a planned and systematic manner to minimize downtime and ensure system stabi...read more

Linux Administrator Jobs

Linux Administrator 5-10 years
IBM India Pvt. Limited
4.1
Bhubaneswar
Linux Administrator 6-10 years
Cognizant
3.8
Kolkata
Unix/Linux Admin 3-6 years
CGI Information Systems and Management Consultants
4.0
Bangalore / Bengaluru

Q9. If a server patched with new kernel update after reboot server came up with old kernel only. How will you troubleshoot it ?

Ans.

To troubleshoot a server that booted up with the old kernel after a new kernel update, check the bootloader configuration, verify the kernel installation, and review the update process.

  • Check the bootloader configuration to ensure it is pointing to the correct kernel version.

  • Verify the kernel installation to see if the new kernel was successfully installed.

  • Review the update process to identify any errors or issues that may have occurred during the update.

  • Check the logs for any...read more

Q10. how to check logs perticular time and send report client

Ans.

To check logs at a particular time and send a report to the client, use the 'grep' command and a cron job.

  • Use the 'grep' command to search for logs at a specific time.

  • Create a cron job to run the 'grep' command at the desired time.

  • Use a script to format the log data and send it to the client.

  • Consider using a tool like Logwatch or Logrotate for automated log management.

Q11. Where do we store syslog file in linux and what are the different type of filesystems in linux

Ans.

Syslog files are stored in /var/log directory. Different types of filesystems in Linux include ext4, xfs, btrfs, and more.

  • /var/log directory is the default location for storing syslog files

  • Different types of filesystems in Linux include ext4, xfs, btrfs, etc.

  • ext4 is the default filesystem for most Linux distributions

  • xfs is commonly used for large-scale storage systems

  • btrfs is known for its advanced features like snapshots and checksums

Q12. How will you create and add new disk to the system using LVM ? Write the commands of the process.

Ans.

To add a new disk to the system using LVM, you need to initialize the disk, create a physical volume, extend the volume group, and finally extend the logical volume.

  • Initialize the disk using fdisk or parted command

  • Create a physical volume using pvcreate command

  • Extend the volume group using vgextend command

  • Extend the logical volume using lvextend command

  • Resize the filesystem using resize2fs or xfs_growfs command

Q13. What are the various commands to check the CPU , Memory utilization in Linux server ?

Ans.

Various commands to check CPU and Memory utilization in Linux server.

  • To check CPU utilization: top, mpstat, sar

  • To check Memory utilization: free, vmstat, sar -r

Q14. How can a user be locked out after 6 unsuccessful password attempts for a duration of 30 minutes?

Ans.

To lock a user out after 6 unsuccessful password attempts for 30 minutes, modify the PAM configuration file.

  • Edit the PAM configuration file (/etc/pam.d/common-auth) to include the 'pam_tally2' module.

  • Set the 'deny' option in the 'pam_tally2' module to lock the user out after 6 failed attempts.

  • Specify the 'unlock_time' option in the 'pam_tally2' module to set the duration of the lockout period to 30 minutes.

  • Example: auth required pam_tally2.so deny=6 unlock_time=1800

Q15. How can I grant SFTP access exclusively to the user David?

Ans.

Grant SFTP access exclusively to user David

  • Create a new group specifically for David, e.g. 'davidgroup'

  • Set the ChrootDirectory in the SSH configuration file to restrict David's access to a specific directory

  • Add David to the 'davidgroup' and configure the necessary permissions for SFTP access

Q16. Patch management in Redhat, clustering, how your company backup data

Ans.

Effective patch management, clustering, and secure data backup are crucial for Redhat administration.

  • Patch management involves identifying vulnerabilities, testing patches, and deploying them in a timely manner.

  • Clustering ensures high availability and load balancing across multiple servers.

  • Data backup should be done regularly and securely, with offsite storage and encryption.

  • Examples of backup solutions include Redhat's own Backup and Recovery Manager, as well as third-party ...read more

Q17. 8 What is swap 9 what is at 10 what is yum

Ans.

Swap is a space on a hard disk that is used as virtual memory when the physical RAM is full. 'at' is a command to schedule tasks. Yum is a package manager for Linux.

  • Swap is a dedicated space on a hard disk used as virtual memory

  • It is used when the physical RAM is full

  • The 'at' command is used to schedule tasks to be executed at a later time

  • Yum is a package manager used in Linux distributions like CentOS and Fedora

Q18. How much expectations and company will provide x nd x amount

Ans.

Salary expectations should align with industry standards and company budget.

  • Salary expectations should be based on industry standards and the company's budget

  • Research the average salary for the position in your area

  • Consider the company's size and financial situation

  • Negotiate for benefits and perks in addition to salary

  • Be open to discussing salary expectations with the employer

Q19. What is lvm ?

Ans.

LVM stands for Logical Volume Manager. It is a tool used for managing disk space in Linux.

  • LVM allows for dynamic allocation of disk space

  • It allows for easy resizing of partitions

  • LVM can create snapshots of logical volumes for backup purposes

  • Examples of LVM commands include pvcreate, vgcreate, and lvcreate

Q20. How to use ll command on linux terminal in redhat Ubuntu

Ans.

ll command is used to list files and directories in a detailed format on Linux terminal.

  • To use ll command, simply type 'll' in the terminal and press Enter.

  • The output will display detailed information about files and directories, including permissions, owner, group, size, and modification date.

  • You can also use 'ls -l' as an alternative to 'll' command.

Q21. What are links tell me about linux linux permission

Ans.

Links are pointers to files or directories. Linux permissions control access to files and directories.

  • Links can be hard links or symbolic links

  • Hard links point directly to the file's inode

  • Symbolic links point to the file's path

  • Linux permissions are divided into three categories: owner, group, and others

  • Each category has three types of permissions: read, write, and execute

  • Permissions can be set using chmod command

Q22. What is LVM. How to extend LVM on fly. What is the mean of Samba. What is blkid, lsblk. . How to give grub password.

Ans.

LVM is a logical volume manager that allows for dynamic disk partitioning. Samba is a software that allows file and printer sharing between Linux and Windows systems. blkid and lsblk are commands used to display information about block devices. Grub password can be set using the grub2-setpassword command.

  • LVM allows for easy management of disk space by creating logical volumes that can span multiple physical disks.

  • To extend LVM on the fly, first create a new partition on the p...read more

Q23. what is the command to check load average?

Ans.

The command to check load average is 'uptime' or 'w' in the terminal.

  • Use the 'uptime' command to display the load average for the system.

  • Alternatively, you can use the 'w' command to see load average along with other information.

  • Load average represents the average system load over a period of time.

Q24. what is linux and what is difference between unix and linux

Ans.

Linux is an open-source operating system based on Unix. Unix is a family of multitasking, multiuser computer operating systems.

  • Linux is open-source and free to use, while Unix is proprietary and usually requires a license.

  • Linux has a larger community and more distributions (e.g. Ubuntu, CentOS), while Unix has fewer variations (e.g. Solaris, AIX).

  • Linux is more customizable and can run on a wider range of hardware, while Unix is more stable and secure.

  • Linux uses the GNU Genera...read more

Q25. how to data upload , what is samba, what is ftp, what is linux, what is firewall

Ans.

Data upload can be done using Samba or FTP on a Linux system, with firewall protection.

  • Data upload can be done using Samba, which is a file sharing protocol that allows users to access and share files over a network.

  • FTP (File Transfer Protocol) is another method for data upload, allowing users to transfer files between a client and a server.

  • Linux is an open-source operating system known for its stability, security, and flexibility.

  • Firewall is a security system that monitors a...read more

Q26. How you can schedule a job regularly?

Ans.

You can schedule a job regularly using cron jobs in Linux.

  • Use the crontab command to edit the cron table

  • Specify the schedule using the appropriate syntax (minute, hour, day of month, month, day of week)

  • For example, to schedule a job to run every day at 3am, you would add the following line to the cron table: 0 3 * * * /path/to/command

Q27. What is Hard link and soft link?

Ans.

Hard links and soft links are two types of links used in Unix-like operating systems to create shortcuts to files.

  • Hard links are direct pointers to the inode of a file, while soft links are indirect pointers to the file name.

  • Hard links cannot link directories or files on different filesystems, while soft links can.

  • If the original file is deleted, hard links will still point to the data, while soft links will be broken.

  • Example: 'ln file1 file2' creates a hard link, 'ln -s file...read more

Q28. How to user lock & unlock

Ans.

The 'user lock' and 'user unlock' commands are used to lock and unlock user accounts in Linux.

  • To lock a user account, use the 'usermod' command with the '-L' option followed by the username.

  • Example: usermod -L username

  • To unlock a user account, use the 'usermod' command with the '-U' option followed by the username.

  • Example: usermod -U username

Q29. what is nfs?

Ans.

NFS (Network File System) is a distributed file system protocol that allows a user on a client computer to access files over a network.

  • NFS enables sharing of files and directories between multiple computers in a network.

  • It provides transparent access to remote files as if they were local.

  • NFS uses a client-server architecture where the server exports directories that can be mounted on client machines.

  • It supports both read and write operations on shared files.

  • NFS is commonly us...read more

Q30. What is linux what are the components of linux

Ans.

Linux is an open-source operating system based on Unix. Its components include kernel, shell, GUI, utilities, and applications.

  • Kernel: manages hardware resources and provides services to other system components

  • Shell: provides a command-line interface for users to interact with the system

  • GUI: provides a graphical interface for users to interact with the system

  • Utilities: perform various system tasks such as file management, networking, and security

  • Applications: software program...read more

Q31. What is LVM, DHCP, how to set ip address in nic

Ans.

LVM is Logical Volume Manager used for managing disk storage, DHCP is Dynamic Host Configuration Protocol for assigning IP addresses, setting IP address in NIC involves configuring network settings.

  • LVM allows for dynamic resizing of logical volumes

  • DHCP automatically assigns IP addresses to devices on a network

  • To set IP address in NIC, use commands like ifconfig or ip addr

  • Example: sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0

Q32. If kernal stuck in update what we do

Ans.

If kernel stuck in update, we can try to reboot the system and check for any errors.

  • Try to reboot the system

  • Check for any errors

  • If the issue persists, try to boot into a previous kernel version

  • If all else fails, reinstall the kernel

Q33. What is lun and how to extend and reduce them

Ans.

LUN stands for Logical Unit Number, used to represent a logical volume on a storage area network (SAN).

  • LUNs are virtual disks created on a SAN storage system.

  • To extend a LUN, you can use tools like LVM (Logical Volume Manager) to add more physical storage to the existing LUN.

  • To reduce a LUN, you can shrink the filesystem on the LUN and then shrink the LUN itself using storage management tools.

Q34. Define the steps of File system creation.

Ans.

Steps for file system creation involve partitioning, formatting, and mounting the file system.

  • Partition the disk using tools like fdisk or parted

  • Format the partition with a file system like ext4 or xfs

  • Create a mount point directory

  • Mount the file system to the mount point

  • Update /etc/fstab to automatically mount the file system on boot

Q35. What do you understand by NFS?

Ans.

NFS stands for Network File System, a distributed file system protocol that allows a user on a client computer to access files over a network.

  • NFS allows a user to access files on a remote server as if they were local files.

  • It is commonly used in Unix and Linux environments for sharing files and directories.

  • NFS uses RPC (Remote Procedure Call) to communicate between the client and server.

  • It provides centralized storage that can be accessed by multiple clients over a network.

  • NF...read more

Q36. What is Apache,How to install and what is port no.

Ans.

Apache is a popular open-source web server software. It is used to host websites and web applications.

  • Apache is used to serve web content over the internet.

  • To install Apache on Linux, you can use package managers like apt or yum.

  • The default port number for Apache is 80, but it can be changed in the configuration file.

  • Example: sudo apt-get install apache2

Q37. what is LVM and how to extend it?

Ans.

LVM stands for Logical Volume Manager, used to manage disk space by creating logical volumes from physical volumes.

  • LVM allows for dynamic resizing of logical volumes without downtime.

  • To extend an LVM, first add a new physical volume to the volume group using 'pvcreate'.

  • Then extend the volume group to include the new physical volume using 'vgextend'.

  • Finally, extend the logical volume using 'lvextend' and resize the filesystem using 'resize2fs' or 'xfs_growfs'.

Q38. how to check memory space? what is lvm? what is crontab? how to extend lvm? what is swap memory?

Ans.

To check memory space, use 'free' or 'top' command. LVM is Logical Volume Manager for managing disk space. Crontab is a tool for scheduling tasks. Swap memory is virtual memory used when physical memory is full.

  • Check memory space using 'free' command to see total, used, and free memory

  • LVM is a tool for managing disk space by creating logical volumes from physical volumes

  • Crontab is a file used to schedule tasks to run at specific times

  • To extend LVM, use 'lvextend' command to i...read more

Q39. what is roolback patching

Ans.

Rollback patching is a process of reverting a patch or update to a previous version.

  • Rollback patching is useful when a patch or update causes issues or conflicts with the system.

  • It involves undoing the changes made by the patch or update and restoring the system to its previous state.

  • Rollback patching can be done manually or automatically depending on the system and the patching process.

  • Examples of rollback patching tools include Windows System Restore and Linux's yum history...read more

Q40. what is lvm? and how to extend lvm partition

Ans.

LVM (Logical Volume Manager) is a tool used to manage disk storage in Linux systems. It allows for dynamic resizing of partitions.

  • LVM allows for creating logical volumes from physical volumes

  • To extend an LVM partition, first add a new physical volume to the volume group

  • Then extend the logical volume using the 'lvextend' command

  • Finally, resize the file system using 'resize2fs' or 'xfs_growfs'

Q41. Tell me about briefly Linux appeche, yum rpm ,rehl

Ans.

Apache, Yum, RPM, and RHEL are all components commonly used in Linux administration.

  • Apache is a popular open-source web server used to host websites.

  • Yum is a package manager used in Red Hat Enterprise Linux (RHEL) to install, update, and remove software packages.

  • RPM (Red Hat Package Manager) is a command-line package management tool used to install software packages in RHEL.

  • RHEL is a Linux distribution developed by Red Hat and is commonly used in enterprise environments.

Q42. How to check running process, disk space

Ans.

To check running processes and disk space, use commands like ps, top, df, and du.

  • Use 'ps' command to display currently running processes

  • Use 'top' command to display real-time system information, including processes

  • Use 'df' command to check disk space usage on filesystems

  • Use 'du' command to check disk usage of directories

Q43. how to role back updates

Ans.

To roll back updates, identify the update and use the appropriate command to remove it.

  • Identify the update that needs to be rolled back

  • Use the appropriate command to remove the update

  • Verify that the rollback was successful

Q44. how to create repository

Ans.

To create a repository, you need to choose a package manager and create a configuration file.

  • Choose a package manager like YUM or APT

  • Create a configuration file with repository details

  • Add packages to the repository

  • Sign the repository to ensure package integrity

  • Publish the repository for others to use

Q45. What is linux , crontab

Ans.

Linux is an open-source operating system based on Unix. Crontab is a tool used to schedule tasks in Linux.

  • Linux is highly customizable and widely used in servers and supercomputers.

  • Crontab allows users to schedule tasks to run automatically at specified times.

  • Examples of tasks that can be scheduled with crontab include backups, updates, and system maintenance.

  • Crontab uses a specific syntax to specify the time and frequency of tasks.

  • Crontab can be edited using the command line...read more

Q46. Explain few Linux Commands you know?

Ans.

Linux commands are essential for a Linux Administrator. Here are a few commonly used commands:

  • ls - list directory contents

  • cd - change directory

  • mkdir - make directory

  • rm - remove files or directories

  • cp - copy files or directories

  • mv - move or rename files or directories

  • grep - search for a pattern in a file

  • ps - display information about running processes

  • top - display system resource usage

  • chmod - change file permissions

  • sudo - execute a command as a superuser

  • apt-get - package manag...read more

Q47. What is the mean of nfs. What is nfs config file.

Ans.

NFS stands for Network File System. It is a protocol used for sharing files/folders between Unix/Linux systems over a network.

  • NFS allows a user on a client computer to access files over a network as if they were on the local hard drive.

  • The NFS configuration file is /etc/exports, which lists the directories that can be exported to remote systems.

  • NFS uses RPC (Remote Procedure Call) to communicate between the client and server.

  • NFS can be used to share files between Linux/Unix s...read more

Q48. How to access from one server to another

Ans.

Accessing one server from another can be done using SSH (Secure Shell) protocol.

  • Use SSH (Secure Shell) protocol to securely access another server

  • Use the 'ssh' command followed by the username and IP address of the target server

  • Provide the password or use SSH keys for authentication

  • Example: ssh username@ip_address

Q49. What is DHCP and how its working?

Ans.

DHCP stands for Dynamic Host Configuration Protocol. It is a network protocol that automatically assigns IP addresses to devices on a network.

  • DHCP server assigns IP addresses to devices on a network

  • It also provides other network configuration information such as subnet mask and default gateway

  • DHCP uses a lease mechanism to manage IP address assignments

  • DHCP operates on the client-server model

  • Example: When a device connects to a network, it sends a DHCP request to the DHCP serv...read more

1
2
3
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions for Linux Administrator Related Skills

Interview experiences of popular companies

3.7
 • 10k Interviews
3.7
 • 7.3k Interviews
3.7
 • 5.4k Interviews
3.8
 • 5.4k Interviews
3.8
 • 4.7k Interviews
3.6
 • 3.6k Interviews
4.1
 • 2.3k Interviews
3.7
 • 438 Interviews
4.2
 • 396 Interviews
3.8
 • 172 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Linux Administrator Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
Awards 2025
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits
Stay ahead in your career with AmbitionBox app