Top 150 Linux Interview Questions and Answers

Updated 25 Jul 2025

2d ago

Q. What is the command to check profile consistency in Linux?

Ans.

The command to check profile consistency in Linux is 'saproot.sh'.

  • The 'saproot.sh' command checks the consistency of SAP profiles in Linux.

  • It can be run as the 'root' user or with 'sudo'.

  • The output of the command shows any inconsistencies in the prof...read more

Asked in Amazon

6d ago

Q. How do you create an archive file in Linux?

Ans.

To create an archive file in LINUX, use the 'tar' command.

  • Use the 'tar' command followed by the options and the name of the archive file.

  • To create a compressed archive, use the 'z' option for gzip compression or 'j' option for bzip2 compression.

  • To ex...read more

Asked in Kwalee India

5d ago

Q. What is the echo command?

Ans.

Echo command is used to print the input or output text on the terminal.

  • Echo command is a built-in command in Linux/Unix systems.

  • It is used to display a line of text/string that is passed as an argument.

  • It can also be used to redirect the output of a ...read more

Q. What is your knowledge of Windows and Linux-based servers?

Ans.

I have extensive knowledge of both Windows and Linux based servers.

  • I am proficient in managing and configuring Windows Server operating systems.

  • I have experience in setting up and maintaining Linux servers, including Ubuntu, CentOS, and Red Hat.

  • I am ...read more

Are these interview questions helpful?

Q. What happens when you delete files in Linux?

Ans.

When files are deleted in Linux, they are not immediately removed from the disk but rather marked as available for reuse.

  • Deleting a file in Linux removes its entry from the file system's directory structure.

  • The file's data blocks are not immediately ...read more

Asked in Housing.com

4d ago

Q. How would you monitor file changes in Linux?

Ans.

Use inotifywait command to monitor file changes in Linux.

  • Install inotify-tools package

  • Use inotifywait command with options like -m for continuous monitoring and -e for specific events

  • Example: inotifywait -m /var/log/messages -e modify

  • Output will show...read more

Share interview questions and help millions of jobseekers 🌟
man with laptop

Asked in Samsung

5d ago

Q. What are the differences between UNIX and LINUX?

Ans.

UNIX is an operating system developed in the 1970s, while LINUX is a free and open-source operating system based on UNIX.

  • UNIX is proprietary, while LINUX is open-source

  • UNIX is older and has a longer history, while LINUX is a newer development

  • UNIX is ...read more

Asked in Rackspace and 2 others

4d ago

Q. Explain the Linux boot process.

Ans.

Linux boot process involves several stages including BIOS, bootloader, kernel initialization, and user space initialization.

  • The process starts with the BIOS (Basic Input/Output System) which initializes hardware components.

  • The bootloader (GRUB or LIL...read more

Asked in Ixigo.com

6d ago

Q. Tell us about your technical knowledge of Linux and Networking.

Ans.

I have extensive technical knowledge in Linux and Networking, including experience with system administration, network configuration, and troubleshooting.

  • Proficient in Linux operating systems such as Ubuntu, CentOS, and Red Hat

  • Experience with network...read more

Q. What is the maximum size (in bytes) of a filename in Linux?

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 con...read more

Linux Jobs

Uber logo
Senior Staff Engineer 14-16 years
Uber
4.2
Bangalore / Bengaluru
Uber logo
Sr Staff Engineer - L6 14-16 years
Uber
4.2
Bangalore / Bengaluru
Robert Bosch Engineering and Business Solutions Private Limited logo
Senior Computer Vision and Machine Learning Engineer 8-10 years
Robert Bosch Engineering and Business Solutions Private Limited
4.1
Hosur

Asked in TCS

3d ago

Q. What is the difference between chmod and chown in Linux?

Ans.

chmod changes file permissions while chown changes file ownership in Linux.

  • chmod is used to change the read, write, and execute permissions of a file or directory.

  • chown is used to change the owner and group of a file or directory.

  • chmod uses a numeric...read more

3d ago

Q. How do you kill a 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 doe...read more

Q. What is the meaning of sed?

Ans.

sed is a command-line text editor used for stream editing and manipulating text.

  • sed stands for 'stream editor'

  • It is used for performing text transformations on input streams or files

  • sed uses regular expressions to match and modify text

  • It can be used ...read more

Asked in Apexon

4d ago

Q. Explain the difference between a process and a thread in Linux.

Ans.

Processes are independent execution units, while threads are lightweight, share resources within a process.

  • A process is an independent program in execution, while a thread is a smaller unit of a process.

  • Processes have their own memory space; threads ...read more

Asked in Thales

2d ago
Q. What is the Find command in Linux and how is it used?
Ans.

The Find command in Linux is used to search for files and directories based on specified criteria.

  • Used to search for files and directories in a specified directory

  • Criteria can include file name, size, permissions, and more

  • Can be combined with other c...read more

Asked in Lentra AI

3d ago

Q. Tell me about the filter command in Linux.

Ans.

Filter command in Linux is used to filter out specific data from a file or output.

  • The basic syntax of the filter command is 'command | filter'.

  • Commonly used filter commands are grep, sed, awk, cut, sort, uniq, etc.

  • grep is used to search for a specifi...read more

Q. How do we find the DNS of a website using a Linux command?

Ans.

To find DNS of a website using Linux command

  • Use 'nslookup' command followed by the website URL

  • Alternatively, use 'dig' command followed by the website URL

  • Both commands will display the DNS information of the website

Asked in EPAM Systems

5d ago

Q. How do you execute a command to check if the httpd service is running?

Ans.

Command to check httpd service status

  • Use the command 'systemctl status httpd' to check the status of httpd service

  • If httpd service is running, the output will show 'active (running)'

  • If httpd service is not running, the output will show 'inactive (dea...read more

Asked in BSW Soft

1d ago

Q. How do you check the current user in a Linux terminal?

Ans.

To check the current user in Linux terminal, you can use the 'whoami' command.

  • Use the 'whoami' command to display the current user's username.

  • Alternatively, you can also use the 'id' command to display information about the current user.

Asked in Infosys

3d ago

Q. How do you check memory usage in a Linux EC2 instance?

Ans.

To check memory usage in Linux EC2 instance, use the command 'free -m'

  • Open terminal or SSH into the EC2 instance

  • Type 'free -m' command and press enter

  • The output will show the total, used, and free memory in megabytes

  • You can also use 'top' command to ...read more

Q. Have you completed any Linux training or certifications?

Ans.

Yes, I have completed Linux training and obtained certification.

  • I have completed a Linux training course offered by XYZ Institute.

  • I have obtained the Linux Professional Institute Certification (LPIC-1).

  • I have hands-on experience working with various ...read more

1d ago

Q. How do you create a 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...read more

Asked in ServiceNow

3d ago

Q. What is shell in Linux?

Ans.

Shell in Linux is a command-line interpreter that allows users to interact with the operating system by executing commands.

  • Shell is a program that takes commands from the keyboard and gives them to the operating system to perform.

  • It can also be used ...read more

Asked in Amazon

1d ago

Q. How comfortable are you with Linux commands like grep?

Ans.

I am very comfortable with Linux-Grep etc.

  • I have extensive experience working with Linux and using command line tools like grep, awk, and sed.

  • I am familiar with regular expressions and can use them effectively in my work.

  • I have used these tools to tr...read more

Asked in RSA

3d ago

Q. How do you manage group and user permissions in Linux?

Ans.

To give group and user permissions in Linux, use the chmod command.

  • Use the chmod command followed by the permission code (e.g. 755) and the file or directory name.

  • To give permissions to a specific user, use the chown command followed by the username ...read more

5d ago

Q. Why can only four primary partitions be created in Linux?

Ans.

Only 4 primary partitions are created in Linux due to limitations of the MBR partitioning scheme.

  • MBR partitioning scheme allows for a maximum of 4 primary partitions.

  • Extended partitions can be used to create more than 4 partitions by creating logical...read more

Asked in BT Business

4d ago

Q. What is Red Hat?

Ans.

Red Hat is a leading provider of open source software solutions, including the popular Red Hat Enterprise Linux operating system.

  • Red Hat is a software company that specializes in open source solutions.

  • They are known for their flagship product, Red Ha...read more

Q. Where are user passwords located in Linux?

Ans.

The user's password in Linux is stored in the /etc/shadow file.

  • The /etc/shadow file contains the encrypted passwords for all the users on the system.

  • Each line in the /etc/shadow file represents a user and their password information.

  • The password field...read more

Asked in BSW Soft

2d ago

Q. How will you edit an existing file on a Linux server?

Ans.

To edit an existing file on a Linux server, you can use a text editor like Vim or Nano.

  • Use a text editor like Vim or Nano to open the file for editing

  • Make the necessary changes to the file

  • Save the changes and exit the text editor

Asked in CGI Group

1d ago
Q. What are some important Crontab commands used in Linux?
Ans.

Crontab commands are used in Linux for scheduling tasks at specific times.

  • crontab -e: Edit the crontab file

  • crontab -l: List the current crontab entries

  • crontab -r: Remove the current crontab file

  • crontab -u username: Specify the username whose crontab ...read more

1
2
3
4
5
6
Next

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Infosys Logo
3.6
 • 7.9k Interviews
Cognizant Logo
3.7
 • 5.9k Interviews
Amazon Logo
4.0
 • 5.4k Interviews
Capgemini Logo
3.7
 • 5.1k Interviews
IBM Logo
3.9
 • 2.5k Interviews
DXC Technology Logo
3.6
 • 843 Interviews
CGI Group Logo
4.0
 • 527 Interviews
ServiceNow Logo
4.1
 • 124 Interviews
Motadata Logo
3.7
 • 17 Interviews
View all
Interview Tips & Stories
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Linux Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 Lakh+

Reviews

10L+

Interviews

4 Crore+

Salaries

1.5 Cr+

Users

Contribute to help millions

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

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
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