Linux Interview Questions with Answers: -
1. What is the Linux kernel?
Answer: The Linux kernel is the core component of the
Linux operating system. It provides essential services to the system and acts
as an interface between the hardware and the software.
2.What is a shell in Linux?
Answer: A shell is a command-line interpreter that
allows users to interact with the Linux operating system. It accepts and
executes commands entered by the user.
3.How do you change permissions for a file in Linux?
Answer: The chmod command is used to change
permissions for a file in Linux. For example, to give read, write, and execute
permissions to the owner, you can use the command: chmod u+rwx filename.
4.What is the purpose of the grep command?
Answer: The grep command is used for searching text
patterns within files. It allows you to search for specific words or patterns
and display the matching lines.
5.How do you check the disk usage in Linux?
Answer: The du (disk usage) command is used to check
the disk usage of files and directories in Linux. By default, it shows the disk
usage in bytes.
6.What is the purpose of the top command?
Answer: The top command is used to monitor system
processes in real-time. It provides information about CPU usage, memory usage,
and other system statistics.
7.How do you find and kill a process in Linux?
Answer: The ps command is used to find the process ID
(PID) of a process, and the kill command is used to terminate a process. For
example, to kill a process with PID 1234, you can use the command: kill 1234.
8.What is the purpose of the ifconfig command?
Answer: The ifconfig command is used to configure
network interfaces in Linux. It allows you to view and modify IP addresses,
netmasks, and other network settings.
9.How do you create a symbolic link in Linux?
Answer: The ln command is used to create symbolic
links in Linux. For example, to create a symbolic link named "link"
that points to a file "target", you can use the command: ln -s target
link.
10.How do you archive and compress files in Linux?
Answer: The tar command is used to archive files in
Linux, and the gzip or bzip2 commands are used to compress the archive. For
example, to create a compressed tar archive, you can use the command: tar -czvf
archive.tar.gz files.
11.How do you find all files containing a specific text
in Linux?
Answer: The grep command is used to search for text
patterns within files. To find all files containing a specific text, you can
use the command: grep -r "text" directory.
12.What is the purpose of the rsync command?
Answer: The rsync command is used for efficient file
synchronization and transfer. It can be used to copy and synchronize files
between local and remote systems.
13.How do you check the current running processes in
Linux?
Answer: The ps command is used to display information
about currently running processes. To list all processes, you can use the
command: ps -ef.
14.What is the purpose of the SSH protocol?
Answer: The SSH (Secure Shell) protocol is used for
secure remote login and file transfer between systems. It provides encryption
and authentication to protect data transmission.
15.How do you schedule a task to run at a specific time
in Linux?
ConversionConversion EmoticonEmoticon