Linux Administrator
20+ Linux Administrator Interview Questions and Answers for Freshers
Q1. how we can transfer file from one server to other server?
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
Q2. You are unable to unmount a file system, what will you do?
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
Q3. how to get MAC based routing table ? what happened at kernel level when we pung server.
To get MAC based routing table, use 'ip neigh show' command. When pinging a server, kernel sends ICMP packets and updates ARP cache.
Use 'ip neigh show' command to display MAC based routing table
Kernel sends ICMP packets when pinging a server
Kernel updates ARP cache with MAC address of the server
Q4. which performance tuning parameter you know and how to set it permanently and temporary
One performance tuning parameter is swappiness, which controls how often the system swaps data to disk.
To set swappiness temporarily, use the 'sysctl' command: sysctl vm.swappiness=10
To set swappiness permanently, edit the '/etc/sysctl.conf' file and add 'vm.swappiness=10'
Another performance tuning parameter is 'dirty_ratio' which controls the percentage of system memory that can be filled with dirty pages before processes are forced to write them out to disk
To set dirty_rati...read more
Q5. how to data upload , what is samba, what is ftp, what is linux, what is firewall
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
Q6. How you can schedule a job regularly?
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
Share interview questions and help millions of jobseekers 🌟
Q7. What is Hard link and soft link?
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
Q8. what is nfs?
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
Linux Administrator Jobs
Q9. sed command syntax and what are special permission
sed command is used for text manipulation in Linux. Special permissions include setuid, setgid, and sticky bit.
sed command is used for text substitution and manipulation in Linux
Syntax: sed 's/pattern/replacement/g' filename
Special permissions in Linux include setuid, setgid, and sticky bit
Setuid: allows a user to execute a file with the permissions of the file owner
Setgid: allows a user to execute a file with the permissions of the group owner
Sticky bit: restricts the deleti...read more
Q10. Define the steps of File system creation.
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
Q11. What do you understand by NFS?
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
Q12. how you harden your linux server
I harden my Linux server by implementing security measures to protect against potential threats.
Regularly update the operating system and software to patch vulnerabilities
Disable unnecessary services and ports to reduce attack surface
Implement strong password policies and use SSH keys for authentication
Set up a firewall to control incoming and outgoing traffic
Monitor logs for suspicious activities and set up intrusion detection systems
Q13. What is /mnt and fstab?
The /mnt directory is used as a mount point for temporary mounting of filesystems, and fstab is a configuration file that lists filesystems to be mounted at boot.
The /mnt directory is commonly used for temporarily mounting external storage devices or network shares.
The fstab file is located at /etc/fstab and contains information about filesystems to be mounted at boot time.
Entries in fstab include the device to mount, the mount point, filesystem type, mount options, and dump ...read more
Q14. What is Programming Language
Programming language is a set of instructions used to create software applications.
Programming languages are used to write code that computers can understand and execute.
There are many programming languages such as Java, Python, C++, and JavaScript.
Each programming language has its own syntax and rules for writing code.
Programming languages can be classified into low-level and high-level languages.
Examples of low-level languages include Assembly and Machine language, while hi...read more
Q15. What do you know about cloud computing
Cloud computing is the delivery of computing services over the internet, including servers, storage, databases, networking, software, and more.
Cloud computing allows users to access and use resources on-demand without the need for physical infrastructure.
It offers scalability, flexibility, cost-effectiveness, and increased efficiency.
Examples of cloud computing services include Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform.
Q16. what is lvm how it is work?
LVM stands for Logical Volume Manager, a tool used to manage disk storage in Linux systems.
LVM allows for dynamic resizing of logical volumes without downtime.
It consists of physical volumes, volume groups, and logical volumes.
Commands like pvcreate, vgcreate, lvcreate are used to create and manage LVM.
LVM provides flexibility in managing storage space by allowing logical volumes to span multiple physical disks.
Q17. write script to echo line repeatedly
Script to echo a line repeatedly
Use a loop to echo the line multiple times
Specify the number of times to repeat the line
Example: for i in {1..5}; do echo 'Hello, World!'; done
Q18. Why tcpdump is used?
tcpdump is used for network troubleshooting and analysis by capturing and analyzing network packets.
Captures network packets for analysis
Helps in troubleshooting network issues
Can be used to monitor network traffic
Provides detailed information about network communication
Useful for security analysis and monitoring
Q19. Write a code to print table of any number
Code to print table of any number in Python
Use a loop to iterate from 1 to 10 (for a 10x table)
Multiply the number by the current iteration value
Print the result for each iteration
Q20. how to check wwn number
To check WWN number, use commands like 'lsscsi' or 'lsblk' in Linux.
Use 'lsscsi' command to list SCSI devices and their WWN numbers
Use 'lsblk' command to list block devices and their WWN numbers
Q21. What is JIT Compiler
JIT Compiler stands for Just-In-Time Compiler. It is a type of compiler that compiles code during runtime.
JIT Compiler is used to improve the performance of applications by compiling code on the fly.
It is commonly used in Java and .NET environments.
JIT Compiler compiles code into machine code, which can be executed directly by the CPU.
It can also optimize code by removing unnecessary instructions and reducing memory usage.
Examples of JIT Compiler include HotSpot for Java and ...read more
Q22. how to remove older kernel
To remove older kernels in Linux, use package management tools like apt or yum.
Use 'apt autoremove' command in Debian-based systems to remove old kernels
Use 'yum remove
' command in Red Hat-based systems to remove old kernels Check available kernels with 'uname -r' command before removing
Q23. how to rollback package
To rollback a package, use package manager to uninstall current version and install previous version.
Use package manager to uninstall current version of the package
Install the previous version of the package using package manager
Check for any dependencies that may need to be rolled back as well
Q24. how to mount nfs?
To mount NFS, use the 'mount' command with the NFS server IP address and the mount point on the local machine.
Use the 'mount' command followed by the NFS server IP address and the mount point on the local machine
For example: sudo mount 192.168.1.100:/shared_folder /mnt/nfs_share
Ensure that the NFS server is properly configured and accessible from the local machine
Q25. What is workload in linux
Workload in Linux refers to the amount of work being done by the system at a given time.
Workload can include tasks such as running processes, handling network requests, and managing system resources.
Monitoring workload is important for ensuring system performance and stability.
Tools like top, htop, and sar can be used to track and analyze workload.
High workload can lead to system slowdowns or crashes.
Balancing workload across multiple servers can help improve overall system e...read more
Q26. Define Boot process.
Boot process is the sequence of steps that occur when a computer system is starting up.
BIOS/UEFI initialization
Loading the bootloader
Loading the kernel
Init process starts
Launching user space processes
Q27. how to do patching.
Patching involves applying updates to software to fix vulnerabilities and improve performance.
Identify the software that needs to be patched
Download the appropriate patches from the vendor's website
Test the patches in a non-production environment before applying them to production systems
Schedule downtime for applying patches to minimize disruption
Document the patching process for future reference
Q28. What linux kernel
The Linux kernel is the core component of the Linux operating system, responsible for managing hardware resources and providing essential services.
The Linux kernel is open-source and developed by a community of developers worldwide.
It is released under the GNU General Public License (GPL).
The kernel version can be checked using the 'uname -r' command.
Examples of popular Linux kernel versions include 2.6, 3.x, 4.x, and 5.x.
Interview Questions of Similar Designations
Top Interview Questions for Linux Administrator Related Skills
Interview experiences of popular companies
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
Reviews
Interviews
Salaries
Users/Month