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

View Video Transcript
#Networking #Software