DEV Community

Amanda Igwe
Amanda Igwe

Posted on

1 1 1 1 2

Day 24/ 30 Days of Linux Mastery: Networking Commands in RHEL 9

Table of Contents


Introduction

Welcome back to Day 24 of this practical Linux challenge! Today, we are diving into networking commands.

Networking is at the heart of everything in Linux, from connecting to the internet, reaching APIs, to managing remote servers.


What is Networking in Linux?

Networking in Linux enables systems to communicate with each other over a LAN, WAN, or the internet by configuring interfaces, IP addresses, routes, DNS, and other related settings.

Imagine you are setting up a cloud server on AWS or managing a VM. You will need to check its IP, confirm connectivity, troubleshoot DNS, or even check which ports are open. These tasks all rely on basic but powerful networking tools.


Core Networking Commands

More commonly used Networking command options are listed in the table below.

Networking Command Description
ip a Shows all IP addresses assigned to interfaces
ip r Displays the routing table
ping <host> Sends test packets to a host to check connectivity
nmcli Manages Network Manager settings (create, modify, check connections)
nmcli connection show List network connections)
nmcli device status Show status of devices
nmcli con up <connection-name> Activate a connection
curl <URL> Makes requests to a web server and returns response
ss -tuln Shows open TCP/UDP ports and listening services
hostname Show system's hostname
hostnamectl Manage system hostname
hostname -I Displays the IP address(es) of your system
dig <domain> Fetches DNS information for a domain
traceroute <host> Traces the path packets take to reach a host
ifdown / ifup Brings network interfaces down/up (used in some RHEL setups)

Real-World Scenario: Networking Command

You just launched your very first RHEL 9 virtual machine (VM) on a cloud platform like AWS, Azure, or GCP. You are supposed to install some packages and set up a web server. But… nothing is loading. You can’t even install updates.

Let's diagnose the problem.

  • First check the network interface has an ip address .
ip a        # you should see an output like 192.168 .....
Enter fullscreen mode Exit fullscreen mode
  • Now check your if you have internet access
ping 8.8.8.8  

# If this fails then there is no internet. You can also try 

ip r    # to check the default route

# You should see something like "default via 192.168.1.1 dev eth0" if this does not show then you have your answer to the ping failure
Enter fullscreen mode Exit fullscreen mode
  • Check Status
nmcli device status     # checks the status 
nmcli device connect eth0   # to connect to internet
ip a   - # to confirm it has connected and active
Enter fullscreen mode Exit fullscreen mode

n3 description

  • Let's test a DNS (Domain name server like Google)
ping google.com

# always use Ctrl + C to stop the commands from running
Enter fullscreen mode Exit fullscreen mode

n5 description

  • Now test outbound access. If it loads HTML content, your network is up and DNS works!
curl https://www.google.com
Enter fullscreen mode Exit fullscreen mode

n6 description


Conclusion

Understanding and using networking tools like ip, ping, ss, curl, and nmcli gives you control over your Linux system’s connectivity. You will be able to diagnose problems faster, automate network tasks, and support your team more confidently, especially in cloud environments.

Keep practicing. And remember: The terminal is your friend.

If this is helpful to you, feel free to bookmark, comment, like and follow me for Day 25!


Let's Connect!

If you want to connect or share your journey, feel free to reach out on LinkedIn.
I am always happy to learn and build with others in the tech space.

#30DaysLinuxChallenge #Redhat#RHCSA #RHCE #CloudWhistler #Linux #Rhel #Ansible #Vim #CloudComputing #DevOps #LinuxAutomation #IaC #SysAdmin#CloudEngineer

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

AWS Security LIVE! Stream

Streaming live from AWS re:Inforce

Tune into Security LIVE! at re:Inforce for expert takes on modern security challenges.

Learn More