Part #3: Networking, Package Management, and Monitoring (50–75 Questions)
In this part of the Linux Interview Handbook, we’ll dive into four essential areas every Linux administrator must know: networking basics, package management, disk and system diagnostics, and real-time performance monitoring.

Welcome to Part 3 of our Linux Interview Questions Series. In the previous part, we explored user and group management, file system basics, and job scheduling techniques using tools like cron
and at
.
In this part, we’ll focus on four critical topics: networking basics, package management, disk and system diagnostics, and real-time performance monitoring.
You’ll learn how to check IP addresses, manage firewall rules, install and update packages, troubleshoot storage issues, and monitor system health - all using essential Linux commands that every sysadmin should know.
🔌 Networking Basics
In this section, we cover the essential tools and commands that help you understand and control your Linux system’s network.
50. How do you check the system’s hostname?
The hostname is the name of your computer on a network, which is useful for identifying your system, especially in multi-server environments.
You can check the system’s hostname using either of these methods:
hostname
Or
cat /etc/hostname
Both commands will show you the current hostname of your system.
51. How do you change the hostname in Linux?
There are two ways to change the hostname: temporarily (until next reboot) and permanently.
Temporarily (only lasts until reboot):
sudo hostname new-hostname
Permanently (recommended way):
sudo hostnamectl set-hostname new-hostname
After changing the hostname, you may also want to update the /etc/hosts
file to avoid networking issues.
127.0.1.1 new-hostname
52. How do you check the system’s IP address?
There are a few ways to check your system’s IP address, depending on what kind of IP you want (internal vs external) and the tools available.
To view your internal IP address (used inside your local network):
ip a
Older method (still works on many systems):
ifconfig
To find your external (public) IP address (used on the internet):
curl -s ifconfig.me