The route
command is used to display and set the network routing information in linux
, where the route refers to the static route. It should be noted that the route
command is not permanently saved.
Syntax format: route [parameter]
Common parameters:
Example
# 显示当前路由route # 添加一条路由,多网卡可以通过dev来指定route add -net 192.168.1.1 netmask 255.255.255.0 dev eth0 # 删除默认路由route del default gw 192.168.1.1
This article is reprinted from https://xugaoxiang.com/2022/06/07/linux-cmds-29-route/
This site is for inclusion only, and the copyright belongs to the original author.