Linux System Administrator

80+ Linux System Administrator Interview Questions and Answers

Updated 21 Nov 2024

Popular Companies

search-icon

Q1. What are the causes of user not able to login application

Ans.

Possible causes of user not able to login to an application

  • Incorrect username or password

  • Account locked or disabled

  • Expired password

  • Network connectivity issues

  • Application server down

  • Incorrect permissions or access rights

  • Firewall blocking access

  • Authentication server issues

  • Application configuration errors

Q2. How create a user in single line commands

Ans.

A user can be created in a single line command using the 'useradd' command in Linux.

  • Use the 'useradd' command followed by the username to create a user.

  • Specify additional options like home directory, shell, etc. if required.

  • Example: useradd john -m -s /bin/bash

Linux System Administrator Interview Questions and Answers for Freshers

illustration image

Q3. Which command is used to check the memory status?

Ans.

The command used to check memory status is 'free'.

  • The 'free' command displays the total amount of free and used physical and swap memory in the system.

  • It also shows the buffers and cache used by the kernel.

  • The output of the 'free' command can be customized using various options like '-h' for human-readable format and '-s' for a continuous display.

  • Another command that can be used to check memory status is 'top', which displays the memory usage of individual processes in real-t...read more

Q4. Prepare Apache virtualization,Tomcat installation and configuration with Linux,centos,AWS EC2,S3 bucket, VMware management,zone replication.Database migration (MySQL&PostgreSQL),LVM configuration and management...

read more
Ans.

The question is about Linux System Administration and covers various topics such as Apache virtualization, Tomcat installation and configuration, AWS EC2 and S3 bucket, VMware management, database migration, LVM configuration and management, SSL configuration, ISCSI server and client configuration, haproxy configuration and management, and database replication.

  • Apache virtualization

  • Tomcat installation and configuration

  • AWS EC2 and S3 bucket

  • VMware management

  • Database migration (M...read more

Are these interview questions helpful?

Q5. What is lvm and why is it required?

Ans.

LVM stands for Logical Volume Manager. It is required for flexible management of storage devices in Linux systems.

  • LVM allows for the creation of logical volumes that span multiple physical disks.

  • It enables resizing of logical volumes without the need to unmount the file system.

  • LVM also provides features such as snapshots and mirroring for data backup and redundancy.

  • It is commonly used in enterprise environments where storage requirements are dynamic and constantly changing.

Q6. Maximum size (in bytes) of the filename in Linux can be?

Ans.

The maximum size of a filename in Linux is 255 bytes.

  • The maximum length includes the entire path and filename.

  • The limit is imposed by the file system, not the operating system.

  • Some file systems, such as ext4, support longer filenames with special configuration.

  • Long filenames can cause issues with some applications and scripts.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. How to set passwd newly created user

Ans.

To set the password for a newly created user in Linux, use the 'passwd' command followed by the username.

  • Open the terminal or SSH into the Linux system

  • Run the 'passwd' command followed by the username of the new user

  • Enter and confirm the new password when prompted

Q8. What is cron job how to write

Ans.

A cron job is a scheduled task that runs automatically at specific intervals on a Linux system.

  • Cron jobs are managed by the cron daemon, which reads a configuration file called crontab.

  • To write a cron job, you need to edit the crontab file using the 'crontab' command.

  • Each line in the crontab file represents a separate cron job and follows a specific format.

  • The format consists of five fields: minute, hour, day of month, month, and day of week.

  • You can use various symbols and op...read more

Linux System Administrator Jobs

Consultant - Linux System Administrator 3-4 years
Headstrong (GENPACT)
3.9
Hyderabad / Secunderabad
Associate Senior Unix/Linux System Administrator 4-5 years
GLOBAL PAYMENTS ASIA-PACIFIC INDIA PRIVATE LIMITED
4.1
Pune
Linux System Admin 5-10 years
GlobalLogic
3.7
Noida

Q9. Ssh port number? Difference between rpm and yum? Remove text file in Linux? Chmod use?

Ans.

SSH port number is 22 by default. RPM is a package manager for Red Hat-based systems, while YUM is a higher-level package manager that uses RPM as its backend. To remove a text file in Linux, you can use the 'rm' command. Chmod is a command used to change the permissions of a file or directory.

  • SSH port number is typically 22, but it can be changed in the SSH server configuration file.

  • RPM is a low-level package manager used for installing, upgrading, and removing software pack...read more

Q10. How to reset the root password

Ans.

To reset the root password, you can use the single-user mode or a bootable Linux distribution.

  • Boot into single-user mode by interrupting the boot process and appending 'init=/bin/bash' to the kernel command line.

  • Remount the root filesystem as read-write using the 'mount -o remount,rw /' command.

  • Change the root password using the 'passwd' command.

  • Alternatively, boot from a bootable Linux distribution like a Live CD or USB and mount the root partition to reset the password.

Q11. What is Networking how dns cluster works in Linux?

Ans.

Networking is the practice of connecting devices to share resources. DNS cluster in Linux is a group of DNS servers that work together.

  • Networking involves connecting devices to share resources such as files, printers, and internet access.

  • DNS cluster in Linux is a group of DNS servers that work together to provide high availability and load balancing for DNS queries.

  • DNS cluster can be configured using tools like BIND and PowerDNS.

  • DNS cluster can improve the performance and rel...read more

Q12. What is the function of grep command?

Ans.

grep command is used to search for a specific pattern in a file or output.

  • Used to search for a specific pattern in a file or output

  • Can be used with regular expressions

  • Can be used to search for multiple patterns at once

  • Can be used with other commands like find and ls

  • Example: grep 'error' file.txt

Q13. What is Decommission and recomission

Ans.

Decommission is the process of retiring a system or service, while recommission is the process of bringing it back into service.

  • Decommission involves shutting down and removing a system or service from operation.

  • Recommission involves restoring a decommissioned system or service back into operation.

  • Decommission and recommission are common processes in IT infrastructure management.

  • Examples include retiring an old server and replacing it with a new one, or taking a website offli...read more

Q14. How to configure Apache server in red hat 7.9

Ans.

To configure Apache server in Red Hat 7.9, follow these steps:

  • Install Apache using yum package manager

  • Start Apache service and enable it to start at boot

  • Configure firewall to allow HTTP traffic

  • Create virtual hosts for multiple websites

  • Configure SSL/TLS encryption for secure connections

Q15. What is LVM why we use LVM

Ans.

LVM (Logical Volume Manager) is a disk management tool used in Linux systems to manage storage devices and create logical volumes.

  • LVM allows for easy management of storage by abstracting physical storage devices into logical volumes.

  • It provides features like volume resizing, snapshots, and striping for improved performance and flexibility.

  • LVM enables dynamic allocation of storage space, making it easier to add or remove storage devices without disrupting the system.

  • It allows ...read more

Q16. How to create blank file in rhel

Ans.

To create a blank file in RHEL, you can use the 'touch' command.

  • Open the terminal in RHEL.

  • Use the 'touch' command followed by the desired file name to create a blank file.

  • For example, to create a file named 'example.txt', you would run: touch example.txt

  • The 'touch' command can also be used to update the timestamp of an existing file.

Q17. What is use for lsblk command in rhel

Ans.

lsblk command is used to list block devices in RHEL.

  • Displays information about all available or the specified block devices.

  • Shows the device name, size, mount point, and file system type.

  • Can be used to identify unmounted disks or partitions.

  • Can also be used to check the status of a disk or partition.

  • Example: lsblk -a -o NAME,SIZE,MOUNTPOINT,FSTYPE

Q18. How to configure LVM

Ans.

LVM (Logical Volume Manager) is configured by creating physical volumes, volume groups, and logical volumes.

  • Create physical volumes using the 'pvcreate' command

  • Create volume groups using the 'vgcreate' command

  • Create logical volumes using the 'lvcreate' command

  • Format the logical volumes with a file system using the 'mkfs' command

  • Mount the logical volumes to desired mount points using the 'mount' command

  • Update the '/etc/fstab' file to mount the logical volumes at boot

Q19. What is the pink command?

Ans.

The pink command is not a valid Linux command.

  • There is no pink command in Linux.

  • It is possible that the interviewer is testing the candidate's honesty and ability to admit when they don't know something.

  • The candidate should respond honestly and explain that they are not familiar with the pink command.

  • Alternatively, the candidate could ask for clarification or context to better understand the question.

Q20. what is NFS advantages of NFS

Ans.

NFS allows remote access to files and directories, providing centralized storage and easy sharing.

  • Enables sharing of files and directories across multiple systems

  • Reduces storage costs by centralizing data on a single server

  • Improves data availability and reliability through redundancy

  • Simplifies administration by allowing for centralized management

  • Examples: Sharing files between a web server and a database server, sharing user home directories across a network

Q21. How to kill process in rhel 7.2

Ans.

To kill a process in RHEL 7.2, use the 'kill' command followed by the process ID.

  • Identify the process ID using 'ps' command

  • Use 'kill' command followed by the process ID to terminate the process

  • Use 'kill -9' command to force kill the process if it doesn't respond to regular kill command

Q22. how to to patching on physical servers

Ans.

Patching physical servers involves identifying vulnerabilities, testing patches, scheduling downtime, and applying patches.

  • Identify vulnerabilities through vulnerability scanning or manual review

  • Test patches in a non-production environment to ensure compatibility and stability

  • Schedule downtime with stakeholders and communicate the impact of the patching

  • Apply patches using a patch management tool or manually

  • Verify the success of the patching and monitor for any issues post-pat...read more

Q23. What is netstat command

Ans.

Netstat is a command-line tool used to display network connections, routing tables, and network interface statistics.

  • Displays active network connections and their status

  • Shows routing tables and network interface statistics

  • Can be used to troubleshoot network issues

  • Can be used to identify open ports and listening services

  • Syntax: netstat [options]

Q24. how do you migrate a SUSE enterprise server eg., SLES 12 SP2 to SLES15 SP2

Ans.

To migrate a SUSE enterprise server from SLES 12 SP2 to SLES 15 SP2, you can use the online migration method.

  • Ensure that the server meets the minimum requirements for SLES 15 SP2

  • Backup all important data before starting the migration process

  • Use the 'zypper' package manager to perform the online migration

  • Follow the official SUSE documentation for detailed steps and best practices

Q25. What is fsmo? Explain in detail

Ans.

FSMO stands for Flexible Single Master Operations. It is a role in Active Directory that controls specific domain-wide operations.

  • FSMO roles are divided into two categories: forest-wide and domain-wide.

  • There are five FSMO roles: Schema Master, Domain Naming Master, RID Master, PDC Emulator, and Infrastructure Master.

  • The Schema Master controls all updates and modifications to the schema.

  • The Domain Naming Master controls the addition or removal of domains in the forest.

  • The RID ...read more

Q26. What is I node number

Ans.

An I node number is a unique identifier assigned to each file in a Unix-like file system.

  • I node number is also known as index node number.

  • It contains metadata about the file such as ownership, permissions, timestamps, etc.

  • It is used by the operating system to locate and access the file on the disk.

  • The command 'ls -i' can be used to display the I node number of a file.

Q27. What is patching

Ans.

Patching is the process of applying updates or fixes to software or systems to address vulnerabilities or improve functionality.

  • Patching involves downloading and installing updates provided by software vendors.

  • It helps to fix bugs, security vulnerabilities, and improve performance.

  • Patches can be applied to operating systems, applications, or firmware.

  • Regular patching is crucial to maintain system integrity and protect against cyber threats.

  • Examples include applying security p...read more

Q28. How to set permission in directly

Ans.

To set permissions in a directory, use the chmod command followed by the desired permission code.

  • Use the chmod command followed by the permission code (e.g. chmod 755 directory_name)

  • The permission code consists of three digits, each representing the permission for owner, group, and others respectively

  • The digits are calculated by adding the values of the desired permissions (read=4, write=2, execute=1)

  • For example, 755 means owner has read, write, and execute permission, while ...read more

Q29. Explain the boot process of Linux?

Ans.

The boot process of Linux involves several stages, including BIOS/UEFI, bootloader, kernel initialization, and system initialization.

  • The boot process starts with the BIOS/UEFI firmware, which performs a Power-On Self-Test (POST) and initializes hardware.

  • The bootloader (e.g., GRUB) is then loaded, which allows the user to choose the operating system and loads the kernel into memory.

  • The kernel initializes essential components, such as memory management, device drivers, and file...read more

Q30. What is cron tab & how to setup

Ans.

Cron tab is a time-based job scheduler in Linux used to automate repetitive tasks. It runs in the background and executes commands at specified intervals.

  • Cron tab is configured using the 'crontab' command

  • Each user has their own crontab file located in /var/spool/cron/crontabs/

  • The syntax for setting up a cron job is: * * * * * command-to-be-executed

  • The five asterisks represent the minute, hour, day of the month, month, and day of the week respectively

  • Examples: 0 0 * * * /path/...read more

Q31. How to install packages in rhel

Ans.

To install packages in RHEL, use the yum package manager.

  • Open the terminal and log in as root or use sudo

  • Use the command 'yum install package_name' to install a package

  • Use 'yum search keyword' to search for a package

  • Use 'yum update' to update all installed packages

  • Use 'yum remove package_name' to remove a package

Q32. What is networking? Which types networks? What is DNS? What is DHCP? Explain router and switch?

Ans.

Networking is the practice of connecting devices to share resources. There are different types of networks such as LAN, WAN, MAN, etc.

  • Networking involves connecting devices to share resources such as files, printers, and internet access.

  • Local Area Network (LAN) is a network that connects devices within a small geographical area.

  • Wide Area Network (WAN) is a network that connects devices over a large geographical area.

  • Metropolitan Area Network (MAN) is a network that connects d...read more

Q33. What are backups? what are ports?

Ans.

Backups are copies of data that can be used to restore the original data in case of data loss or corruption. Ports are communication endpoints used for network connections.

  • Backups are essential for data recovery in case of disasters or system failures

  • Ports are identified by numbers and are used to establish connections between devices

  • Common ports include HTTP (80), HTTPS (443), SSH (22), FTP (21), etc.

Q34. how to do patching roll back

Ans.

Patching rollback can be done by identifying the patch, uninstalling it, and restoring the previous version.

  • Identify the patch that caused the issue

  • Uninstall the patch using the appropriate command

  • Restore the previous version of the software or package

  • Test to ensure the issue has been resolved

Q35. What is the difference between SMB and NFS

Ans.

SMB is a protocol used for sharing files and printers on Windows systems, while NFS is a protocol used for sharing files on Unix/Linux systems.

  • SMB is more commonly used in Windows environments, while NFS is more commonly used in Unix/Linux environments.

  • SMB uses NetBIOS over TCP/IP for communication, while NFS uses Remote Procedure Call (RPC) for communication.

  • SMB supports file and printer sharing, while NFS is primarily used for file sharing only.

  • SMB requires authentication f...read more

Q36. What is appache server configuration file

Ans.

The Apache server configuration file is a text file that contains directives for configuring the Apache web server.

  • The default location of the configuration file is /etc/httpd/conf/httpd.conf on Red Hat-based systems and /etc/apache2/apache2.conf on Debian-based systems.

  • The configuration file is used to set options such as the server's port number, document root directory, and virtual hosts.

  • The file can be edited manually or through a graphical interface such as Webmin or cPa...read more

Q37. What is group policy

Ans.

Group Policy is a feature in Windows that allows administrators to manage user and computer settings centrally.

  • Group Policy is used to enforce security policies, software installation, and other settings across a network.

  • It allows administrators to control user access to resources, restrict software installation, and configure network settings.

  • Group Policy settings are stored in Group Policy Objects (GPOs) that can be linked to domains, sites, or organizational units (OUs).

  • Ex...read more

Q38. What is windows and type of windows

Ans.

Windows is a popular operating system developed by Microsoft.

  • Windows is a graphical operating system.

  • It has different versions such as Windows 10, Windows 8, Windows 7, etc.

  • It is widely used in personal computers, laptops, and servers.

  • It supports various applications and software.

  • It has a user-friendly interface and customizable features.

Q39. How does DNS Resolution take place?

Ans.

DNS resolution is the process of converting domain names into IP addresses.

  • When a user enters a domain name in a web browser, the DNS resolver sends a query to the DNS server.

  • The DNS server looks up the domain name in its database and returns the corresponding IP address.

  • If the DNS server does not have the IP address, it will query other DNS servers until it finds the correct one.

  • Once the IP address is obtained, the DNS resolver caches it for future use to speed up the proces...read more

Q40. Patch processing. Explain step of patch processing.

Ans.

Patch processing involves identifying, downloading, testing, and applying software patches to ensure system security and stability.

  • Identify which patches are needed for the system

  • Download the necessary patches from official sources

  • Test the patches in a controlled environment to ensure compatibility

  • Apply the patches to the system following best practices

  • Verify that the patches were successfully applied and the system is functioning correctly

Q41. Entry of local repo in rhel 7.2

Ans.

To add a local repo in RHEL 7.2, create a .repo file in /etc/yum.repos.d/ directory.

  • Create a .repo file in /etc/yum.repos.d/ directory

  • Add the necessary details like name, baseurl, enabled, gpgcheck, etc. in the .repo file

  • Save the file and run 'yum clean all' command to clear the cache

  • Run 'yum repolist' command to verify if the local repo is added successfully

Q42. How to create LVM partision

Ans.

To create LVM partition, first create physical volumes, then create volume group and finally create logical volumes.

  • Use pvcreate command to create physical volumes

  • Use vgcreate command to create volume group

  • Use lvcreate command to create logical volumes

  • Use mkfs command to create file system on logical volumes

Q43. Diffrence between rhel vs centos

Ans.

RHEL is a commercial distribution with paid support, while CentOS is a free, community-driven distribution.

  • RHEL is developed by Red Hat and requires a paid subscription for support and updates.

  • CentOS is a community-driven distribution that is free to use and receives updates from the community.

  • Both distributions are based on the same source code and are binary compatible.

  • CentOS is often used as a free alternative to RHEL for those who do not require paid support.

  • RHEL is often...read more

Q44. How do you check system logs in Linux

Ans.

System logs in Linux can be checked using various commands and tools.

  • Use the 'cat' command to view log files directly

  • Use the 'tail' command to view the last few lines of a log file

  • Use the 'grep' command to search for specific keywords in log files

  • Check the '/var/log' directory for system logs

  • Use the 'journalctl' command to view systemd journal logs

Q45. Tell about LVM and sshd services

Ans.

LVM is a logical volume manager used for managing disk space on Linux systems. sshd is the SSH server daemon responsible for secure remote access.

  • LVM allows for dynamic allocation and resizing of logical volumes

  • It provides features like snapshots, mirroring, and striping

  • sshd is responsible for authenticating and encrypting SSH connections

  • It allows remote users to securely access and manage the system

  • sshd configuration is typically done in the /etc/ssh/sshd_config file

Q46. What is hp pro light and types enplain

Ans.

HP ProLiant is a brand of server computers that are designed for enterprise-level computing.

  • HP ProLiant servers are available in various types such as rack, tower, blade, and scale-out servers.

  • They are known for their reliability, performance, and scalability.

  • Some popular models include DL380, ML350, and BL460c.

  • HP ProLiant servers run on various operating systems including Linux, Windows, and VMware.

  • They are commonly used in data centers, cloud computing, and virtualization e...read more

Q47. What is linux and window Os difference

Ans.

Linux is an open-source operating system, while Windows is a proprietary operating system developed by Microsoft.

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

  • Linux is highly customizable and can be modified by users, while Windows has limited customization options.

  • Linux is known for its stability and security, while Windows is more vulnerable to viruses and malware.

  • Linux uses a command-line interface (CLI) as its primary interface,...read more

Q48. Patching from Satellite using yum update commands

Ans.

Patching from Satellite using yum update commands involves registering systems with Satellite, creating custom repositories, and running yum update commands.

  • Register systems with Satellite using subscription-manager command

  • Create custom repositories in Satellite for specific packages or updates

  • Run yum update command on systems to apply patches from Satellite

  • Monitor patching progress and schedule updates as needed

  • Example: Registering a system with Satellite - sudo subscription...read more

Q49. What is LVM? How to Create LVM

Ans.

LVM stands for Logical Volume Manager. It is a tool used to manage disk storage in Linux systems.

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

  • To create LVM, first initialize the physical volumes using 'pvcreate'.

  • Next, create a volume group using 'vgcreate'.

  • Finally, create logical volumes within the volume group using 'lvcreate'.

Q50. difference between hardlink and softlink ?

Ans.

Hardlinks point directly to the inode of a file, while softlinks point to the file's pathname.

  • Hardlinks are essentially duplicate entries in the file system that point to the same data on disk.

  • Softlinks are symbolic references to the target file or directory.

  • Hardlinks cannot span across different file systems, while softlinks can.

  • If the original file is deleted, hardlinks will still point to the data, while softlinks will be broken.

  • Example: ln file1 file2 creates a hardlink, ...read more

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

Top Interview Questions for Linux System Administrator Related Skills

Interview experiences of popular companies

3.7
 • 10k Interviews
3.9
 • 7.8k Interviews
3.7
 • 7.3k Interviews
3.7
 • 5.2k Interviews
4.1
 • 4.9k Interviews
3.6
 • 3.6k Interviews
4.1
 • 2.3k Interviews
4.3
 • 57 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 System 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