How to Add Static Route in Linux | Ubuntu & RHEL | ip route add Command Explained

52 views Jun 10, 2025

linuxtechi.com

In this quick and practical Linux tutorial, you will learn how to add static route in Linux — both temporarily and permanently — using the ip route add command. We will walk through examples on Ubuntu 24.04 Server and Red Hat Enterprise Linux 9 (RHEL 9). ✅ In This Video You’ll Learn: 📌 What is a Static Route? 📌 When and why you need static routing in Linux 📌 How to use ip route add to set a temporary route 📌 How to make routes permanent with: 🟢 Netplan on Ubuntu 🔴 nmcli on RHEL / Rocky Linux 🖥️ Example Command: sudo ip route add 192.168.50.0/24 via 192.168.1.1 dev enp0s3 📂 For Permanent Static Routes: Ubuntu/Debian → Edit /etc/netplan/*.yaml


View Video Transcript
#Networking
#Software