QA
Beginner LevelLinux Commands & SysAdmin

How do hostnamectl, ip addr, and ip route manage hostname and IP network routes?

❓ Interview Prompt: Explain modern iproute2 suite (ip addr, ip link, ip route) replacing legacy ifconfig/route, and setting hostname via hostnamectl.

Modern Linux networking uses the 'iproute2' suite ('ip' command) replacing legacy 'ifconfig' and 'route' commands:

•
'ip addr': Displays network interfaces and assigned IP addresses (formerly 'ifconfig').
•
'ip route': Inspects and manages Linux kernel IP routing tables (formerly 'route').
•
'hostnamectl set-hostname node-01': Updates system hostname permanently.

Code Implementation Example

bash
# Display all network interfaces and assigned IP addresses
ip addr show

# Display default gateway routing table
ip route show

# Set permanent system hostname
sudo hostnamectl set-hostname production-api-01
💡Inspecting network interface IPs and default routes using iproute2 commands.
🎯 Interview Key Takeaway

Use modern ip addr and ip route commands instead of deprecated ifconfig and route utilities.

#iproute2#ip addr#ip route#hostnamectl#Beginner
Back to all Linux Commands & SysAdmin Questions→

More Linux Commands & SysAdmin Interview Questions

Beginner LevelLinux Commands & SysAdmin

How do Linux File Permissions (chmod, chown, chgrp) work in Octal and Symbolic notation?

Beginner LevelLinux Commands & SysAdmin

What is the Linux Filesystem Hierarchy Standard (/bin, /etc, /var, /usr, /opt, /tmp)?

Beginner LevelLinux Commands & SysAdmin

What are File Descriptors (0=stdin, 1=stdout, 2=stderr) and Redirection (>, >>, 2>&1)?