0% found this document useful (0 votes)
3 views

Linux Commands Guide for Interview Preparation (1)

The document provides a comprehensive list of interview questions and answers related to Linux commands and concepts. Key topics include the Linux kernel, shell, file permissions, popular distributions, and various commands for system monitoring, file management, and network configuration. It serves as a resource for individuals preparing for Linux-related interviews.

Uploaded by

shubhu.4070
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Linux Commands Guide for Interview Preparation (1)

The document provides a comprehensive list of interview questions and answers related to Linux commands and concepts. Key topics include the Linux kernel, shell, file permissions, popular distributions, and various commands for system monitoring, file management, and network configuration. It serves as a resource for individuals preparing for Linux-related interviews.

Uploaded by

shubhu.4070
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Linux Commands: Comprehensive Interview Questions & Answers

1. What is Linux?
Ans: Linux is an open-source operating system kernel that forms the
basis for various Linux distributions.

2. What are the main components of a Linux system?


Ans: The main components of Linux systems are the kernel, shell,
and file system.

3. What is the role of the Linux kernel?


Ans: The Linux kernel is the core component of the operating system
that manages system resources and provides services to
applications.

4. What is a shell in Linux?


Ans: The shell is a command-line interpreter that allows users to
interact with the operating system. It accepts and executes
commands.

5. What are some popular Linux distributions?


Ans: Popular Linux distributions include Ubuntu, Debian, Fedora,
CentOS, and RedHat Enterprise Linux.

6. How do you change file permissions in Linux?


Ans: The 'chmod' command is used to change file permissions in
Linux.
Example: chmod 755 filename

7. What is the purpose of the 'grep' command?


Ans: The 'grep' command is used to search for specific patterns
within files. It is often used for text searching and filtering.

8. How do you find files in Linux?


Ans: The 'find' command is used to search for files and directories in
Linux based on various criteria like name, size, and permissions.

9. What is the purpose of the 'top' command?


Ans: The 'top' command is used to monitor system processes and
resource usage in real-time.

10. How do you check disk usage in Linux?


Ans: The 'df' command is used to display disk space usage of the file
system.

11. What is a symbolic link in Linux?


Ans: A symbolic link, also known as a soft link, is a special type of
file that points to another file or directory.

12. What is the purpose of the 'tar' command?


Ans: The 'tar' command is used to create and manipulate archive
files. It is often used for bundling multiple files into a single file.

13. How do you start and stop services in Linux?


Ans: Use commands like 'systemctl start service-name' and
'systemctl stop service-name' to manage services.

14. What is the purpose of the 'ping' command?


Ans: The 'ping' command is used to check connectivity between a
source and destination using Internet Control Message Protocol
(ICMP).

15. How do you check network configuration in Linux?


Ans: Use the 'ifconfig' command to display network configuration. In
newer distributions, use the 'ip' command.

16. What is SSH and how does it work?


Ans: SSH (Secure Shell) is a cryptographic network protocol for
secure remote login, command execution, and file transfer. It
encrypts communication between client and server.

17. How do you kill a process in Linux?


Ans: Use the 'kill' command to terminate a process. Example: kill -9
PID or killall process-name.

18. What is the purpose of the 'rsync' command?


Ans: The 'rsync' command is used for efficient synchronization and
transfer of files between systems.

19. How do you check hardware information in Linux?


Ans: Use the 'lshw' command to get detailed information about
system hardware.

20. What is a firewall in Linux?


Ans: A firewall is a security mechanism that controls incoming and
outgoing network traffic based on rules. It helps protect the system
from unauthorized access.

21. How do you check the system's IP address in Linux?


Ans: Use the 'ip addr' command to display the IP address assigned to
network interfaces.

22. What is the purpose of the 'cron' daemon?


Ans: The 'cron' daemon is used for scheduling and automating
recurring tasks in Linux.

23. How do you mount a filesystem in Linux?


Ans: Use the 'mount' command to attach a filesystem to the directory
tree.

24. What is the purpose of the 'chroot' command?


Ans: The 'chroot' command is used to change the root directory for a
process, creating an isolated environment.

25. How do you compress and decompress files in Linux?


Ans: Use the 'gzip' and 'gunzip' commands for compression and
decompression.
26. What is the purpose of the 'iptables' command?
Ans: The 'iptables' command is used for configuring the Linux kernel
firewall to filter network traffic based on rules.

27. How do you check CPU usage in Linux?


Ans: Use the 'top' command or tools like 'htop' and 'mpstat' to
monitor CPU usage.

28. What is the purpose of the 'useradd' command?


Ans: The 'useradd' command is used to create user accounts in
Linux.

You might also like