Linux

Skill
Operating Systems

Top 150 Linux Interview Questions and Answers 2024

184 questions found

Updated 11 Dec 2024

Q1. What is Linux, how will you add the commands

Ans.

Linux is an open-source operating system based on Unix. Commands can be added using the terminal or by installing packages.

  • Linux is free and can be customized to suit specific needs

  • Commands can be added using the terminal by creating a script or alias

  • Packages can be installed using package managers like apt-get or yum

  • Examples of commands include ls, cd, mkdir, rm, etc.

Add your answer
Frequently asked in

Q2. 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 profiles.

  • The command can be used to troubleshoot issues related to SAP profiles.

Add your answer

Q3. How do you check active processes in Linux?

Ans.

To check active processes in Linux, use the 'ps' command.

  • Open the terminal and type 'ps' followed by any options you want to use.

  • Use 'ps aux' to see all processes running on the system.

  • Use 'ps -ef' to see a full list of processes with their parent process ID (PPID).

  • Use 'ps -eLf' to see a tree-like structure of processes and their child processes.

  • Use 'top' command to see real-time information about processes and system resources.

  • Use 'htop' command to see a more user-friendly v...read more

Add your answer

Q4. What is your knowledge about 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 familiar with server virtualization technologies like VMware and Hyper-V.

  • I have knowledge of server security best practices and can implement firewall rules and access controls.

  • I am skilled in troubleshooting server issues and opt...read more

View 1 answer
Are these interview questions helpful?

Q5. How to create 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 extract an archive, use the 'x' option followed by the name of the archive file.

  • To list the contents of an archive, use the 't' option followed by the name of the archive file.

Add your answer

Q6. 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 erased but are marked as available for reuse.

  • The file's inode, which contains metadata about the file, is also marked as available for reuse.

  • Until the space occupied by the deleted file is overwritten by new data, it can potential...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q7. Difference 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 more stable and reliable, while LINUX is more customizable and flexible

  • UNIX has a more limited user base, while LINUX has a larger and more active community

  • Examples of UNIX-based operating systems include Solaris and macOS, while ...read more

Add your answer
Frequently asked in

Q8. 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

View 1 answer

Linux Jobs

Linux Kernel Developer 6-11 years
IBM India Pvt. Limited
4.1
Bangalore / Bengaluru
L2 Linux Specialist 7-12 years
Larsen & Toubro (L&T)
4.0
Chennai
Consultant - Linux System Administrator 3-4 years
Headstrong (GENPACT)
3.9
₹ 4 L/yr - ₹ 8 L/yr
(AmbitionBox estimate)
Hyderabad / Secunderabad

Q9. Tell us about the Technical Knowledge you have about 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 protocols such as TCP/IP, DNS, DHCP, and VPN

  • Skilled in configuring routers, switches, firewalls, and other network devices

  • Knowledge of security practices and tools for securing networks and systems

  • Familiar with virtualization tec...read more

Add your answer

Q10. 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

View 1 answer

Q11. How will you monitor file change 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 the file path, event type and timestamp

Add your answer
Frequently asked in

Q12. How to check stystem logs in linux ?

Ans.

To check system logs in Linux, use the command 'tail -f /var/log/syslog' or 'journalctl -f'.

  • Use 'tail -f /var/log/syslog' to view the system log in real-time

  • Use 'journalctl -f' to view the systemd journal in real-time

  • Use 'grep' command to filter the logs based on specific keywords

  • Logs are stored in /var/log directory with different file names for different services

Add your answer

Q13. how to work DNS in Linux ? what is the record of DNS?

Ans.

DNS in Linux is managed through configuration files and commands. DNS records contain information about domain names and IP addresses.

  • DNS in Linux is managed through the /etc/resolv.conf file which contains the IP addresses of DNS servers.

  • The 'nslookup' command can be used to query DNS records for a specific domain name.

  • DNS records include A records (IP address), MX records (mail server), CNAME records (alias), and more.

  • DNS caching can improve performance by storing frequentl...read more

Add your answer

Q14. 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

Add your answer

Q15. 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.

Add your answer

Q16. 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 to search, replace, insert, delete, and transform text

  • Example: sed 's/old/new/g' file.txt replaces all occurrences of 'old' with 'new' in file.txt

View 1 answer

Q17. What are the basic Linux commands

Ans.

Basic Linux commands include ls, cd, mkdir, rm, cp, mv, cat, grep, chmod, and sudo.

  • 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

  • cat - concatenate and display files

  • grep - search for a pattern in a file

  • chmod - change file permissions

  • sudo - execute a command as a superuser

Add your answer

Q18. tell me 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 specific pattern in a file or output.

  • sed is used to perform text transformations on a file or output.

  • awk is used to process and manipulate text data.

  • cut is used to extract specific columns from a file or output.

  • sort is used to sort the l...read more

Add your answer

Q19. Execute a command to show whether httpd service is running or not

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 (dead)'

View 1 answer

Q20. How to check tha current user in 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.

View 1 answer

Q21. Have you done any Linux training or certification

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 Linux distributions such as Ubuntu, CentOS, and Fedora.

  • I am proficient in using command-line tools and troubleshooting Linux-related issues.

  • I have successfully implemented Linux-based solutions in previous technical support roles.

View 1 answer

Q22. 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.

View 1 answer

Q23. HOW COMFORTABLE YOU ARE WITH LINUX-GREP ETC

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 troubleshoot issues, analyze logs, and automate tasks.

  • For example, I have written scripts to parse log files and extract specific information using grep and awk.

  • I am also comfortable working with shell scripting and can write comple...read more

Add your answer

Q24. How will you give 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 and file or directory name.

  • To give permissions to a specific group, use the chgrp command followed by the group name and file or directory name.

Add your answer

Q25. why only 4 primary partitions are 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 partitions within the extended partition.

  • GPT partitioning scheme does not have the limitation of 4 primary partitions.

View 1 answer
Frequently asked in

Q26. 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 Hat Enterprise Linux (RHEL).

  • Red Hat offers a range of software products and services for businesses.

  • Their solutions focus on security, reliability, and scalability.

  • Red Hat also provides support and training for their products.

View 1 answer

Q27. What is load average in Linux? What is the command and path for the same?

Ans.

Load average is the average number of processes waiting to run on a CPU. Command: 'uptime' or 'top'.

  • Load average is a measure of system utilization.

  • It is the average number of processes waiting to run on a CPU.

  • It is calculated over a period of time, usually 1, 5, and 15 minutes.

  • High load average indicates that the system is overloaded.

  • Command to check load average: 'uptime' or 'top'.

  • Path for 'uptime': /usr/bin/uptime

  • Path for 'top': /usr/bin/top

Add your answer
Frequently asked in

Q28. Where is locate user's password 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 in the /etc/shadow file contains the encrypted password.

  • The password is stored in a hashed format to enhance security.

  • Only the root user or users with sufficient privileges can access the /etc/shadow file.

View 1 answer

Q29. 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

View 1 answer

Q30. How to see the cpu info on linux?

Ans.

To see CPU info on Linux, use the 'lscpu' command.

  • Open the terminal and type 'lscpu' command

  • This will display detailed information about the CPU architecture, vendor, model name, speed, cache size, and more.

  • Other commands like 'cat /proc/cpuinfo' and 'top' can also be used to view CPU information.

Add your answer

Q31. How to installation linux?

Ans.

Linux installation involves creating a bootable USB or DVD, selecting installation options, and configuring the system.

  • Download the Linux distribution of your choice

  • Create a bootable USB or DVD using software like Rufus or Etcher

  • Insert the bootable media and restart the computer

  • Select the installation options, such as language and partitioning

  • Configure the system settings, such as username and password

  • Complete the installation process and reboot the system

Add your answer

Q32. Where do we find distribution of linux

Ans.

Linux distributions can be found on official websites, community forums, and software repositories.

  • Official websites of Linux distributions such as Ubuntu, Fedora, and Debian

  • Community forums like Reddit's r/linux or LinuxQuestions.org

  • Software repositories like apt-get for Debian-based distributions or yum for Red Hat-based distributions

Add your answer

Q33. What will you do if you are not able to run any command in linux.

Ans.

I would troubleshoot the issue by checking for any error messages, verifying permissions, and consulting documentation or online resources.

  • Check for any error messages in the terminal

  • Verify permissions for the command being run

  • Consult documentation or online resources for troubleshooting steps

  • Try running the command with sudo if necessary

Add your answer

Q34. how is yum command used ?

Ans.

yum command is used to install, update, remove, or manage packages on Linux systems.

  • Install a package: yum install package_name

  • Update all packages: yum update

  • Remove a package: yum remove package_name

  • List available packages: yum list available

Add your answer

Q35. What is Linux based Server?

Ans.

A Linux based server is a computer system that runs on a Linux operating system, providing services and resources to clients over a network.

  • Linux based servers are commonly used for web hosting, email hosting, file sharing, and other network services.

  • They are known for their stability, security, and flexibility compared to other operating systems.

  • Examples of popular Linux server distributions include Ubuntu Server, CentOS, and Red Hat Enterprise Linux.

Add your answer

Q36. Explain Linux architecture?

Ans.

Linux architecture is a layered system with kernel at the core, followed by system libraries, utilities, and user interface.

  • Linux architecture consists of the kernel, which is the core component responsible for managing hardware resources and providing essential services.

  • Above the kernel are system libraries, which provide additional functionalities to applications and help in interacting with the kernel.

  • Utilities in Linux include command-line tools and graphical interfaces t...read more

Add your answer
Frequently asked in

Q37. How to write a Linux features

Ans.

Linux features can be written using various programming languages and tools.

  • Identify the specific feature to be written

  • Choose a programming language and tool that is suitable for the feature

  • Write the code for the feature

  • Test the feature to ensure it works as expected

  • Document the feature for future reference

Add your answer

Q38. how is patching is done on linux server

Ans.

Patching on Linux servers involves applying updates to the operating system and software to fix vulnerabilities and improve performance.

  • Patching can be done manually by downloading and installing updates from official repositories.

  • Automated tools like yum or apt-get can be used to apply patches.

  • Regularly checking for updates and scheduling patching maintenance is important for security.

  • Patching helps in fixing bugs, improving stability, and enhancing system performance.

Add your answer
Frequently asked in

Q39. How to do linux administration

Ans.

Linux administration involves managing and maintaining Linux-based systems.

  • Learn basic Linux commands and file system navigation

  • Understand user and group management

  • Configure network settings and services

  • Install and update software packages

  • Monitor system performance and troubleshoot issues

  • Implement security measures

  • Backup and restore data

  • Automate tasks using shell scripting

Add your answer

Q40. What is workload in linux

Ans.

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

Add your answer
Frequently asked in

Q41. How to check memory usage in 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 see memory usage by processes

Add your answer
Frequently asked in

Q42. What is linux? What is linux shell

Ans.

Linux is an open-source operating system based on Unix. Linux shell is a command-line interface to interact with the system.

  • Linux is free and customizable

  • It is widely used in servers, supercomputers, and embedded systems

  • Linux shell provides access to system utilities and commands

  • Commands are entered through the terminal and executed by the shell

  • Examples of Linux shells include Bash, Zsh, and Fish

Add your answer

Q43. how to work on linux VM?

Ans.

To work on a Linux VM, you need to first set up the VM, install necessary software, configure network settings, and access it remotely.

  • Set up the Linux VM using a virtualization software like VirtualBox or VMware.

  • Install the Linux operating system on the VM.

  • Configure network settings such as IP address, subnet mask, and gateway.

  • Access the Linux VM remotely using SSH or a remote desktop protocol.

  • Install necessary software and tools for your work on the Linux VM.

Add your answer
Frequently asked in

Q44. what grep command does ??

Ans.

grep command is used to search for specific patterns in text files.

  • grep stands for 'global regular expression print'

  • It is used to search for a specific pattern in one or more files

  • Can be used with regular expressions to perform complex pattern matching

  • Example: grep 'hello' file.txt will search for the word 'hello' in file.txt

Add your answer

Q45. What is Inode in linux

Ans.

Inode is a data structure in Linux file systems that stores metadata about files, such as permissions, ownership, and location.

  • Inodes contain information like file size, timestamps, and pointers to data blocks.

  • Each file in a Linux system is associated with an inode.

  • Inodes are identified by a unique inode number.

  • When a file is created, an inode is also created to store its metadata.

Add your answer

Q46. How to troubleshoot performance issue in Linux

Ans.

To troubleshoot performance issues in Linux, analyze system resources, check for bottlenecks, monitor processes, and optimize configurations.

  • Analyze system resources such as CPU, memory, disk I/O, and network usage

  • Check for bottlenecks using tools like top, vmstat, iostat, and sar

  • Monitor processes to identify any resource-intensive tasks

  • Optimize configurations by adjusting kernel parameters, tuning applications, and optimizing disk usage

  • Consider using performance monitoring t...read more

Add your answer

Q47. what is Linux and tell me basic commands

Ans.

Linux is an open-source operating system based on Unix that is commonly used in servers and embedded systems.

  • Linux is known for its stability, security, and flexibility.

  • Basic commands include ls (list files), cd (change directory), mkdir (make directory), rm (remove files), and pwd (print working directory).

  • Commands are typically entered in the terminal or shell.

  • Linux uses a hierarchical file system starting with the root directory (/).

Add your answer

Q48. How to develop linux device driver

Ans.

Developing Linux device drivers involves understanding the Linux kernel, writing code to interact with hardware, and testing the driver.

  • Understand the Linux kernel architecture and device model

  • Write the driver code to interact with the hardware

  • Compile the driver code and load it into the kernel

  • Test the driver to ensure proper functionality

  • Handle errors and debug issues as needed

Add your answer

Q49. How to search a file in Linux without using find command?

Ans.

To search a file in Linux without using find command, use the grep command.

  • Use the grep command followed by the file name or pattern to search for

  • Specify the directory to search in using the cd command

  • Use the ls command to list all files in the directory and pipe it to grep

  • Example: cd /var/log && ls | grep syslog

Add your answer

Q50. Do you know about sed command?

Ans.

sed command is a stream editor used to perform text transformations on an input stream or file.

  • sed stands for stream editor

  • It is used to perform text transformations on an input stream or file

  • Commonly used for search and replace operations

  • Syntax: sed 's/search/replace/g' filename

  • Example: sed 's/foo/bar/g' file.txt

Add your answer

Q51. Explain the booting process in the linux server

Ans.

The booting process in a Linux server involves several stages including BIOS, bootloader, kernel loading, and initialization.

  • BIOS (Basic Input/Output System) performs Power-On Self Test (POST) to check hardware components

  • Bootloader (GRUB or LILO) loads the Linux kernel into memory

  • Kernel initializes devices, mounts file systems, and starts system services

  • Init process (systemd or SysVinit) is launched to bring the system to a usable state

Add your answer

Q52. how to know the disk utilization in linux?

Ans.

To know disk utilization in Linux, use commands like df, du, and iostat.

  • Use 'df' command to display disk space usage on Linux filesystems.

  • Use 'du' command to estimate file space usage.

  • Use 'iostat' command to monitor system input/output device loading.

  • Check disk utilization with tools like 'iotop' and 'atop'.

Add your answer
Frequently asked in

Q53. explain about process vs thread in linux

Ans.

Processes are independent instances of a program, while threads are lightweight units within a process sharing resources.

  • Processes have their own memory space, while threads share the same memory space within a process.

  • Processes are heavier to create and manage compared to threads.

  • Threads within a process can communicate more easily and efficiently compared to processes.

  • Example: In a web server, each client connection can be handled by a separate thread within the same proces...read more

Add your answer

Q54. linux give the command which tells the process status

Ans.

The command to check process status in Linux is 'ps'.

  • The 'ps' command displays information about active processes on the system.

  • It provides details such as process ID (PID), CPU and memory usage, and process status.

  • Additional options can be used with 'ps' to customize the output, such as 'ps aux' to display all processes.

  • To continuously monitor process status, 'ps' can be combined with other commands like 'watch' or 'top'.

Add your answer
Frequently asked in

Q55. explain device tree concepts in linux

Ans.

Device tree is a data structure used to describe hardware components in a system and their interconnections.

  • Device tree is used in embedded systems to provide a standardized way of describing hardware components.

  • It is written in a language called Device Tree Source (DTS) and compiled into a binary format called Device Tree Blob (DTB).

  • The device tree is loaded by the bootloader and used by the kernel to configure the hardware.

  • It allows for easy configuration of hardware compon...read more

Add your answer
Frequently asked in

Q56. Linux : How to lock a file

Ans.

To lock a file in Linux, use the flock command or the fcntl system call.

  • The flock command can be used to lock a file by acquiring an exclusive or shared lock.

  • The fcntl system call can be used to lock a file by setting the F_SETLK or F_SETLKW command.

  • Locking a file prevents other processes from modifying or accessing it until the lock is released.

  • Locking can be done at the file level or at specific regions within a file using byte offsets.

  • Locking can be advisory or mandatory, ...read more

Add your answer

Q57. What does sudo mean in linux?

Ans.

sudo stands for 'superuser do' and is a command in Unix/Linux systems that allows a permitted user to execute a command as the superuser or another user.

  • sudo allows users to perform administrative tasks without logging in as the root user

  • It is commonly used to run commands that require elevated privileges, such as installing software or modifying system files

  • Example: sudo apt-get update

Add your answer

Q58. Explain and list linux commands used to on a day-to-day basis.

Ans.

Common Linux commands used by Programmer Analysts on a daily basis.

  • ls - list directory contents

  • cd - change directory

  • pwd - print working directory

  • grep - search for patterns in files

  • cat - concatenate and display files

  • chmod - change file permissions

  • rm - remove files or directories

  • mkdir - create directories

  • tar - archive files

  • ssh - secure shell access

Add your answer
Frequently asked in

Q59. what is Redhat linux

Ans.

Redhat Linux is a popular distribution of the Linux operating system known for its stability, security, and support.

  • Redhat Linux is an open-source operating system based on the Linux kernel.

  • It is known for its enterprise-level features and support.

  • Redhat offers commercial support and services for their Linux distribution.

  • Redhat Linux is widely used in server environments and data centers.

  • Examples of Redhat Linux versions include Red Hat Enterprise Linux (RHEL) and CentOS.

Add your answer

Q60. How can you change the owner of a file in linux

Ans.

To change the owner of a file in Linux, use the chown command.

  • Use the chown command followed by the new owner's username and the file name.

  • To change the owner and group, use chown followed by the new owner's username, a colon, the new group's name, and the file name.

  • To change the owner of a directory and its contents, use the -R option with chown.

  • Example: chown newowner myfile.txt

  • Example: chown newowner:newgroup myfile.txt

  • Example: chown -R newowner mydirectory

Add your answer

Q61. How to configure the DHCP in Linux

Ans.

To configure DHCP in Linux, you need to modify the configuration file and restart the DHCP service.

  • Edit the /etc/dhcp/dhcpd.conf file to configure DHCP settings

  • Specify the range of IP addresses to be leased to clients

  • Set the subnet mask, default gateway, DNS servers, and other options

  • Restart the DHCP service after making changes to the configuration file

Add your answer
Frequently asked in

Q62. How to copy a directory in Linux?

Ans.

To copy a directory in Linux, you can use the 'cp' command with the '-r' flag.

  • Use the 'cp' command followed by the '-r' flag to copy a directory recursively.

  • Specify the source directory followed by the destination directory to copy.

  • Example: cp -r /path/to/source/directory /path/to/destination/directory

Add your answer

Q63. How to use in Linux support command

Ans.

The support command in Linux is used to display system information and statistics.

  • Use 'support' command to display system information and statistics

  • Can be used to troubleshoot system issues

  • Examples: support -v, support --help

Add your answer

Q64. What is uptime command in Linux

Ans.

The uptime command in Linux displays the current time, how long the system has been running, and the number of users currently logged in.

  • Displays the current time

  • Shows how long the system has been running

  • Indicates the number of users currently logged in

Add your answer
Frequently asked in

Q65. How to deny access to user in linux and how to check how many users are logged in

Ans.

To deny access to a user in Linux, you can use the 'usermod' command to lock the account. To check how many users are logged in, you can use the 'who' command.

  • To deny access to a user, use 'usermod -L username' to lock the account

  • To check how many users are logged in, use the 'who' command

  • You can also use the 'w' command to see who is logged in and what they are doing

Add your answer

Q66. What is Linux and what is lilo

Ans.

Linux is an open-source operating system based on Unix. LILO is a boot loader for Linux.

  • Linux is a popular open-source operating system known for its stability and security.

  • It is based on Unix and is widely used in servers, supercomputers, and embedded systems.

  • LILO (LInux LOader) is a boot loader for Linux systems, used to load the operating system into memory during startup.

  • LILO allows users to choose which operating system to boot into if multiple are installed on the same ...read more

Add your answer

Q67. what is linnux start process

Ans.

The Linux start process involves booting the operating system, initializing hardware, loading the kernel, and starting system services.

  • BIOS/UEFI performs Power-On Self Test (POST)

  • Bootloader (GRUB) loads the Linux kernel

  • Kernel initializes hardware and mounts the root filesystem

  • Systemd or SysVinit starts system services

Add your answer

Q68. What happens if LINUX faces a hardware interrupt

Ans.

When LINUX faces a hardware interrupt, it stops executing the current code and jumps to a specific interrupt handler.

  • LINUX stops executing the current code and jumps to a specific interrupt handler

  • The interrupt handler processes the interrupt and resumes normal execution afterwards

  • Different hardware interrupts are handled by different interrupt handlers

Add your answer
Frequently asked in

Q69. What all IPC you have used in Linux

Ans.

I have used various Inter-Process Communication (IPC) mechanisms in Linux, including pipes, message queues, shared memory, and sockets.

  • Pipes: used for communication between related processes

  • Message queues: used for asynchronous communication between processes

  • Shared memory: used for fast communication between processes

  • Sockets: used for communication between processes over a network

Add your answer

Q70. Find command in linux

Ans.

The find command in Linux is used to search for files and directories in a specified location.

  • The basic syntax of the find command is 'find [path] [expression]'.

  • The path specifies the location to search in.

  • The expression specifies the criteria for the search.

  • Some common expressions include -name, -type, -size, and -mtime.

  • Examples: 'find /home/user -name '*.txt'' searches for all files with a .txt extension in the /home/user directory.

  • 'find /var/log -type f -size +1M' searches...read more

Add your answer
Frequently asked in

Q71. How to change the ownership in Linux?

Ans.

To change ownership in Linux, use the chown command followed by the new owner and file/directory name.

  • Use the chown command followed by the new owner and file/directory name

  • To change ownership of a directory and its contents, use the -R option

  • To change group ownership, use the chgrp command

Add your answer

Q72. What is use of pwd command

Ans.

pwd command is used to print the current working directory.

  • pwd stands for 'print working directory'

  • It displays the absolute path of the current working directory

  • It is useful when navigating through the file system

  • It can be used with other commands like cd to navigate to a specific directory

Add your answer

Q73. What is the Command For Hard Disk Partition In Linux?

Ans.

The command for hard disk partition in Linux is fdisk.

  • Open the terminal and type 'sudo fdisk /dev/sda' to partition the first hard disk.

  • Use 'p' to print the partition table, 'n' to create a new partition, 'd' to delete a partition, 'w' to write changes and 'q' to quit.

  • Other partitioning tools in Linux include parted, gparted, and cfdisk.

Add your answer

Q74. What is /proc linux

Ans.

The /proc filesystem in Linux is a virtual filesystem that provides detailed information about the system's hardware, processes, and kernel.

  • It is a virtual filesystem located at /proc that allows access to kernel data structures.

  • It provides information about processes, hardware, and kernel configuration.

  • Files in /proc can be read to gather system information, such as CPU usage, memory usage, and network statistics.

Add your answer
Frequently asked in

Q75. how to check the processes running in linux machine

Ans.

To check processes running in a Linux machine, you can use commands like ps, top, and htop.

  • Use 'ps' command to display information about processes

  • Use 'top' command to display dynamic real-time view of processes

  • Use 'htop' command for an interactive process viewer

Add your answer
Frequently asked in

Q76. What are various cmds in linux

Ans.

Various commands in Linux are used for performing different tasks such as file management, process management, networking, etc.

  • ls - list directory contents

  • cd - change directory

  • pwd - print working directory

  • cp - copy files and directories

  • mv - move or rename files and directories

  • rm - remove files or directories

  • ps - display information about running processes

  • grep - search for specific patterns in files

  • ifconfig - configure network interfaces

  • ping - test network connectivity

Add your answer

Q77. What is rsync in linux?

Ans.

rsync is a command-line tool for syncing files and directories between two locations on a Unix-like system.

  • rsync stands for remote sync.

  • It can be used to copy files locally or between a local and remote system.

  • rsync only transfers the differences between source and destination files, making it efficient for large transfers.

  • It can preserve permissions, timestamps, and other file attributes during synchronization.

  • Example: rsync -avz /path/to/source/ user@remote:/path/to/destina...read more

Add your answer
Frequently asked in

Q78. Code used in linux

Ans.

Linux uses various programming languages for coding, including C, C++, Python, Perl, and Shell scripting.

  • C is commonly used for system programming in Linux

  • C++ is used for developing applications and drivers

  • Python is popular for scripting and automation tasks

  • Perl is used for text processing and system administration

  • Shell scripting (Bash) is used for writing scripts to automate tasks

Add your answer

Q79. Advance level of linux and cloud

Ans.

Advanced level of Linux and cloud is essential for an Associate Saasops Engineer.

  • In-depth knowledge of Linux command line interface and shell scripting

  • Experience with cloud platforms such as AWS, Azure, or Google Cloud

  • Understanding of virtualization technologies like Docker and Kubernetes

  • Familiarity with configuration management tools like Ansible or Puppet

  • Ability to troubleshoot and debug complex issues in a distributed environment

Add your answer
Frequently asked in

Q80. 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

Add your answer

Q81. Linux command for background running process/service

Ans.

The Linux command for background running process/service is 'nohup'.

  • The 'nohup' command is used to run a command immune to hangups and with output to a non-tty.

  • It is often used to run long-running processes or services in the background.

  • The syntax for using 'nohup' is: nohup command &

  • The '&' symbol at the end of the command tells the shell to run the command in the background.

  • Example: nohup python my_script.py &

Add your answer

Q82. Technical support for linux

Ans.

Technical support for Linux involves troubleshooting and resolving issues related to the Linux operating system.

  • Familiarity with Linux command line interface

  • Knowledge of Linux file system and permissions

  • Experience with Linux server administration

  • Ability to diagnose and fix network connectivity issues

  • Proficiency in scripting languages like Bash and Python

  • Understanding of virtualization technologies like Docker and Kubernetes

Add your answer
Frequently asked in

Q83. What is the command to search a file like test.txt in linux?

Ans.

The command to search a file like test.txt in Linux is 'grep'.

  • Use the 'grep' command followed by the search term and the file name to search for a specific text in a file.

  • For example, to search for the word 'hello' in a file named test.txt, you would use the command 'grep hello test.txt'.

Add your answer

Q84. Linux namespaces for k8s

Ans.

Linux namespaces are used in Kubernetes to provide isolated environments for containers.

  • Linux namespaces allow for creating isolated environments within a Linux system

  • Kubernetes uses namespaces to provide isolation for containers

  • Namespaces in Kubernetes include network, PID, mount, and IPC namespaces

  • Example: Each pod in Kubernetes has its own network namespace for network isolation

Add your answer

Q85. What is lvm What did you you about linux

Ans.

LVM stands for Logical Volume Manager. It is a tool used in Linux to manage disk space by creating logical volumes.

  • LVM allows for dynamic resizing of logical volumes without the need to unmount the file system

  • It provides a layer of abstraction between the physical storage devices and the file systems

  • LVM can be used to create snapshots of logical volumes for backup purposes

  • It is commonly used in enterprise environments to manage large amounts of data

Add your answer

Q86. Protocols used to login to Linux server.

Ans.

SSH and Telnet are the most commonly used protocols to login to Linux servers.

  • SSH (Secure Shell) is a secure protocol that encrypts the data transmitted between the client and server.

  • Telnet is an unencrypted protocol that transmits data in plain text.

  • SSH is the recommended protocol for logging in to Linux servers due to its security features.

  • Other protocols like FTP and SFTP can also be used for file transfer and remote access.

  • Authentication methods like password-based, key-b...read more

Add your answer
Frequently asked in

Q87. Different yum and wget command

Ans.

yum is a package manager for Red Hat-based systems, while wget is a command-line tool for downloading files from the internet.

  • yum is used for installing, updating, and removing packages on Red Hat-based systems

  • wget is used for downloading files from the internet, supports HTTP, HTTPS, and FTP protocols

  • yum command example: yum install httpd

  • wget command example: wget https://example.com/file.zip

Add your answer

Q88. Different ports used in linux

Ans.

Linux uses various ports for different services and applications.

  • Port 22: SSH (Secure Shell)

  • Port 80: HTTP (Hypertext Transfer Protocol)

  • Port 443: HTTPS (HTTP Secure)

  • Port 25: SMTP (Simple Mail Transfer Protocol)

  • Port 53: DNS (Domain Name System)

  • Port 3306: MySQL database

  • Port 5432: PostgreSQL database

Add your answer

Q89. I2c speed in linux

Ans.

I2C is a communication protocol used to connect multiple devices in a network. In Linux, the speed of I2C can be configured.

  • I2C speed can be set using the 'i2cset' command in Linux

  • The speed can also be configured in the device tree

  • The maximum speed supported by the hardware should be considered when setting the speed

  • Different devices may require different speeds for optimal performance

Add your answer
Frequently asked in

Q90. Linux commands and depth of linux

Ans.

Linux commands are essential for managing a Linux system. A good understanding of the command line is necessary for a Senior Analyst.

  • Familiarity with basic commands such as ls, cd, mkdir, rm, cp, mv, cat, grep, and chmod

  • Knowledge of more advanced commands such as awk, sed, find, and xargs

  • Understanding of file system hierarchy and permissions

  • Ability to write and execute shell scripts

  • Experience with package management systems such as apt, yum, and pacman

  • Familiarity with network...read more

Add your answer

Q91. Linux commands for deployment

Ans.

Linux commands for deployment are essential for Technical Leads to efficiently manage and deploy applications.

  • Use 'scp' command to securely copy files between local and remote servers

  • Utilize 'rsync' command for efficient file synchronization and transfer

  • Leverage 'ssh' command for secure remote access to servers

  • Employ 'tar' command for archiving and compressing files before deployment

Add your answer
Frequently asked in

Q92. What is linux tell about booting

Ans.

Linux is an open-source operating system that follows a booting process consisting of several stages.

  • The BIOS/UEFI firmware initializes the hardware and loads the bootloader

  • The bootloader loads the kernel and initial RAM disk (initrd)

  • The kernel initializes the system and loads necessary drivers

  • The initrd loads the root file system and starts the init process

  • The init process starts system services and user processes

Add your answer

Q93. The command for view cpu utilisation in linux ?

Ans.

The command to view CPU utilization in Linux is 'top'.

  • Open the terminal and type 'top' command.

  • The output will show the CPU utilization in real-time.

  • Press 'q' to exit the 'top' command.

Add your answer

Q94. Networking of linux and cloud

Ans.

Networking of linux and cloud involves configuring network settings, security protocols, and communication between servers and services.

  • Configuring network interfaces in Linux using tools like ifconfig or ip command

  • Setting up virtual private networks (VPNs) for secure communication between cloud servers

  • Implementing firewall rules to control incoming and outgoing network traffic

  • Using protocols like SSH, HTTPS, or VPN protocols for secure communication

  • Utilizing cloud networking...read more

Add your answer

Q95. Idea about MAC OS and Linux

Ans.

MAC OS and Linux are both Unix-based operating systems with similar command-line interfaces.

  • Both are open-source and free to use.

  • MAC OS is designed for Apple hardware while Linux can run on a variety of hardware.

  • Both have a terminal for command-line operations.

  • Linux has a wider range of software options available.

  • MAC OS has a more user-friendly interface.

  • Both have strong security features.

  • Linux is more customizable and flexible.

  • MAC OS has better compatibility with Apple softw...read more

Add your answer
Frequently asked in

Q96. IP tables in Linux

Ans.

IP tables is a firewall utility in Linux used to manage incoming and outgoing traffic.

  • IP tables is a command-line utility used to configure the Linux kernel firewall

  • It allows users to define rules for incoming and outgoing traffic

  • IP tables can be used to block or allow specific IP addresses, ports, protocols, and more

  • Examples of IP tables commands include iptables -L (list current rules), iptables -A INPUT -s 192.168.1.1 -j DROP (block traffic from a specific IP address)

Add your answer

Q97. IPC mechanisms in Linux

Ans.

IPC mechanisms in Linux are used for inter-process communication between processes running on the same system.

  • IPC mechanisms include pipes, message queues, shared memory, and semaphores.

  • Pipes are used for one-way communication between two processes.

  • Message queues allow for asynchronous communication between processes.

  • Shared memory allows multiple processes to access the same memory space.

  • Semaphores are used for synchronization between processes.

  • IPC mechanisms can be accessed ...read more

Add your answer

Q98. Process cycle in Linux

Ans.

Process cycle in Linux refers to the sequence of events that occur when a process is created, executed, and terminated.

  • When a process is created, it is assigned a unique process ID (PID)

  • The process is then placed in the ready queue and waits for the CPU to execute it

  • Once the process is executed, it enters the running state

  • During execution, the process may be interrupted by the scheduler and placed back in the ready queue

  • When the process completes its execution, it enters the ...read more

Add your answer
Frequently asked in

Q99. any experience on handling linux server logs

Ans.

Yes, I have experience in handling Linux server logs.

  • I have worked extensively with Linux servers and have experience in analyzing and troubleshooting server logs.

  • I am familiar with tools like grep, awk, and sed for parsing and filtering logs.

  • I have experience in setting up log rotation and retention policies to manage disk space.

  • I have also worked with log monitoring tools like Nagios and Zabbix to proactively identify and resolve issues.

  • In one project, I analyzed server log...read more

Add your answer

Q100. Linux command disk usage

Ans.

The Linux command for disk usage is 'du'.

  • The 'du' command shows the disk space used by files and directories in a specified location.

  • Use the '-h' option to display the sizes in a human-readable format.

  • Use the '-s' option to display only the total size of the specified location.

  • Use the '-c' option to display a grand total of all specified locations.

  • Example: 'du -h /home/user' will show the disk usage of the /home/user directory in a human-readable format.

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

Interview experiences of popular companies

3.7
 • 10k Interviews
3.7
 • 7.3k Interviews
3.8
 • 5.4k Interviews
4.1
 • 4.9k Interviews
4.1
 • 2.3k Interviews
3.7
 • 788 Interviews
3.8
 • 512 Interviews
4.0
 • 463 Interviews
4.0
 • 110 Interviews
4.0
 • 12 Interviews
View all
Linux 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
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

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