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

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

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 RHEL/Rocky Linux β†’ Use nmcli connection modify πŸ”Ž Use ip route show to verify static routes. πŸ’‘ Whether you're configuring Linux VMs in the cloud or an on-prem network, this guide has you covered! πŸ‘ If you found this helpful, ✨ Like | πŸ”” Subscribe | πŸ’¬ Comment below! #Linux #Ubuntu #rhel9 #Networking #iproute #LinuxNetworking #StaticRoute #nmcli #Netplan #linuxcommands #Ubuntu24 #RHEL9 #rockylinux

View Video Transcript
#Networking #Software