From 10209c9cc936f7646bb267c8cc47b5e77690041b Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sun, 9 Mar 2025 14:01:49 +0200 Subject: [PATCH] ip*: add more shortforms (#15890) --- pages/linux/ip-address.md | 10 +++++----- pages/linux/ip-link.md | 10 +++++----- pages/linux/ip-maddress.md | 6 +++--- pages/linux/ip-neighbour.md | 4 ++-- pages/linux/ip-route-get.md | 12 ++++++------ pages/linux/ip-route-show.md | 16 ++++++++-------- pages/linux/ip-route.md | 12 ++++++------ pages/linux/ip-rule.md | 16 ++++++++-------- pages/linux/ip.md | 6 +++--- 9 files changed, 46 insertions(+), 46 deletions(-) diff --git a/pages/linux/ip-address.md b/pages/linux/ip-address.md index 3fffa78203..d3b1c0ed24 100644 --- a/pages/linux/ip-address.md +++ b/pages/linux/ip-address.md @@ -9,20 +9,20 @@ - Filter to show only active network interfaces: -`ip {{[a|address]}} show up` +`ip {{[a|address]}} {{[s|show]}} up` - Display information about a specific network interface: -`ip {{[a|address]}} show dev {{eth0}}` +`ip {{[a|address]}} {{[s|show]}} {{eth0}}` - Add an IP address to a network interface: -`ip {{[a|address]}} add {{ip_address}} dev {{eth0}}` +`sudo ip {{[a|address]}} {{[a|add]}} {{ip_address}} dev {{eth0}}` - Remove an IP address from a network interface: -`ip {{[a|address]}} delete {{ip_address}} dev {{eth0}}` +`sudo ip {{[a|address]}} {{[d|delete]}} {{ip_address}} dev {{eth0}}` - Delete all IP addresses in a given scope from a network interface: -`ip {{[a|address]}} flush dev {{eth0}} scope {{global|host|link}}` +`sudo ip {{[a|address]}} {{[f|flush]}} {{eth0}} scope {{global|host|link}}` diff --git a/pages/linux/ip-link.md b/pages/linux/ip-link.md index a70148ffc9..ba10e83f5e 100644 --- a/pages/linux/ip-link.md +++ b/pages/linux/ip-link.md @@ -9,20 +9,20 @@ - Show information about a specific network interface: -`ip {{[l|link]}} show {{ethN}}` +`ip {{[l|link]}} {{[sh|show]}} {{ethN}}` - Bring a network interface up or down: -`ip {{[l|link]}} set {{ethN}} {{up|down}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} {{up|down}}` - Give a meaningful name to a network interface: -`ip {{[l|link]}} set {{ethN}} alias "{{LAN Interface}}"` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} {{[al|alias]}} "{{LAN Interface}}"` - Change the MAC address of a network interface: -`ip {{[l|link]}} set {{ethN}} address {{ff:ff:ff:ff:ff:ff}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} {{[a|address]}} {{ff:ff:ff:ff:ff:ff}}` - Change the MTU size for a network interface to use jumbo frames: -`ip {{[l|link]}} set {{ethN}} mtu {{9000}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} mtu {{9000}}` diff --git a/pages/linux/ip-maddress.md b/pages/linux/ip-maddress.md index 8c67b9d0fa..d4c6497078 100644 --- a/pages/linux/ip-maddress.md +++ b/pages/linux/ip-maddress.md @@ -9,12 +9,12 @@ - List device specific addresses: -`ip {{[m|maddress]}} show dev {{eth0}}` +`ip {{[m|maddress]}} {{[s|show]}} dev {{eth0}}` - Join a multicast group statically: -`sudo ip {{[m|maddress]}} add {{33:33:00:00:00:02}} dev {{eth0}}` +`sudo ip {{[m|maddress]}} {{[a|add]}} {{33:33:00:00:00:02}} dev {{eth0}}` - Leave a static multicast group: -`sudo ip {{[m|maddress]}} delete {{33:33:00:00:00:02}} dev {{eth0}}` +`sudo ip {{[m|maddress]}} {{[d|delete]}} {{33:33:00:00:00:02}} dev {{eth0}}` diff --git a/pages/linux/ip-neighbour.md b/pages/linux/ip-neighbour.md index c551bd01ac..852ce223ce 100644 --- a/pages/linux/ip-neighbour.md +++ b/pages/linux/ip-neighbour.md @@ -9,11 +9,11 @@ - Remove entries in the neighbour table on device `eth0`: -`sudo ip {{[n|neighbour]}} flush dev {{eth0}}` +`sudo ip {{[n|neighbour]}} {{[f|flush]}} dev {{eth0}}` - Perform a neighbour lookup and return a neighbour entry: -`ip {{[n|neighbour]}} get {{lookup_ip}} dev {{eth0}}` +`ip {{[n|neighbour]}} {{[g|get]}} {{lookup_ip}} dev {{eth0}}` - Add or delete an ARP entry for the neighbour IP address to `eth0`: diff --git a/pages/linux/ip-route-get.md b/pages/linux/ip-route-get.md index c05655fafe..9360854741 100644 --- a/pages/linux/ip-route-get.md +++ b/pages/linux/ip-route-get.md @@ -5,24 +5,24 @@ - Print route to a destination: -`ip {{[r|route]}} get {{1.1.1.1}}` +`ip {{[r|route]}} {{[g|get]}} {{1.1.1.1}}` - Print route to a destination from a specific source address: -`ip {{[r|route]}} get {{destination}} from {{source}}` +`ip {{[r|route]}} {{[g|get]}} {{destination}} from {{source}}` - Print route to a destination for packets arriving on a specific interface: -`ip {{[r|route]}} get {{destination}} iif {{eth0}}` +`ip {{[r|route]}} {{[g|get]}} {{destination}} iif {{eth0}}` - Print route to a destination, forcing output through a specific interface: -`ip {{[r|route]}} get {{destination}} oif {{eth1}}` +`ip {{[r|route]}} {{[g|get]}} {{destination}} oif {{eth1}}` - Print route to a destination with a specified Type of Service (ToS): -`ip {{[r|route]}} get {{destination}} tos {{0x10}}` +`ip {{[r|route]}} {{[g|get]}} {{destination}} tos {{0x10}}` - Print route to a destination using a specific VRF (Virtual Routing and Forwarding) instance: -`ip {{[r|route]}} get {{destination}} vrf {{myvrf}}` +`ip {{[r|route]}} {{[g|get]}} {{destination}} vrf {{myvrf}}` diff --git a/pages/linux/ip-route-show.md b/pages/linux/ip-route-show.md index 0d8177b67e..fec4f6e532 100644 --- a/pages/linux/ip-route-show.md +++ b/pages/linux/ip-route-show.md @@ -5,32 +5,32 @@ - Display the routing table: -`ip {{[r|route]}} show` +`ip {{[r|route]}} {{[s|show]}}` - Display the main routing table (same as first example): -`ip {{[r|route]}} show {{main|254}}` +`ip {{[r|route]}} {{[s|show]}} {{main|254}}` - Display the local routing table: -`ip {{[r|route]}} show table {{local|255}}` +`ip {{[r|route]}} {{[s|show]}} {{[t|table]}} {{local|255}}` - Display all routing tables: -`ip {{[r|route]}} show table {{all|unspec|0}}` +`ip {{[r|route]}} {{[s|show]}} {{[t|table]}} {{all|unspec|0}}` - List routes from a given device only: -`ip {{[r|route]}} show dev {{eth0}}` +`ip {{[r|route]}} {{[s|show]}} dev {{eth0}}` - List routes within a given scope: -`ip {{[r|route]}} show scope link` +`ip {{[r|route]}} {{[s|show]}} {{[s|scope]}} link` - Display the routing cache: -`ip {{[r|route]}} show cache` +`ip {{[r|route]}} {{[s|show]}} {{[c|cache]}}` - Display only IPv6 or IPv4 routes: -`ip {{-6|-4}} {{[r|route]}} show` +`ip {{-6|-4}} {{[r|route]}} {{[s|show]}}` diff --git a/pages/linux/ip-route.md b/pages/linux/ip-route.md index 9b35d3d28e..04bb0c2edb 100644 --- a/pages/linux/ip-route.md +++ b/pages/linux/ip-route.md @@ -5,23 +5,23 @@ - Display the routing table: -`ip {{[r|route]}} {{show|list}}` +`ip {{[r|route]}}` - Add a default route using gateway forwarding: -`sudo ip {{[r|route]}} add default via {{gateway_ip}}` +`sudo ip {{[r|route]}} {{[a|add]}} default via {{gateway_ip}}` - Add a default route using `eth0`: -`sudo ip {{[r|route]}} add default dev {{eth0}}` +`sudo ip {{[r|route]}} {{[a|add]}} default dev {{eth0}}` - Add a static route: -`sudo ip {{[r|route]}} add {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` - Delete a static route: -`sudo ip {{[r|route]}} del {{destination_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} {{[d|delete]}} {{destination_ip}} dev {{eth0}}` - Change or replace a static route: @@ -29,4 +29,4 @@ - Show which route will be used by the kernel to reach an IP address: -`ip {{[r|route]}} get {{destination_ip}}` +`ip {{[r|route]}} {{[g|get]}} {{destination_ip}}` diff --git a/pages/linux/ip-rule.md b/pages/linux/ip-rule.md index b5ba8188bb..629a9f17e1 100644 --- a/pages/linux/ip-rule.md +++ b/pages/linux/ip-rule.md @@ -5,32 +5,32 @@ - Display the routing policy: -`ip {{[ru|rule]}} {{show|list}}` +`ip {{[ru|rule]}}` - Add a new rule based on packet source addresses: -`sudo ip {{[ru|rule]}} add from {{192.168.178.2/32}}` +`sudo ip {{[ru|rule]}} {{[a|add]}} from {{192.168.178.2/32}}` - Add a new rule based on packet destination addresses: -`sudo ip {{[ru|rule]}} add to {{192.168.178.2/32}}` +`sudo ip {{[ru|rule]}} {{[a|add]}} to {{192.168.178.2/32}}` - Delete a rule based on packet source addresses: -`sudo ip {{[ru|rule]}} delete from {{192.168.178.2/32}}` +`sudo ip {{[ru|rule]}} {{[d|delete]}} from {{192.168.178.2/32}}` - Delete a rule based on packet destination addresses: -`sudo ip {{[ru|rule]}} delete to {{192.168.178.2/32}}` +`sudo ip {{[ru|rule]}} {{[d|delete]}} to {{192.168.178.2/32}}` - Flush all deleted rules: -`ip {{[ru|rule]}} flush` +`sudo ip {{[ru|rule]}} {{[f|flush]}}` - Save all rules to a file: -`ip {{[ru|rule]}} save > {{path/to/ip_rules.dat}}` +`ip {{[ru|rule]}} {{[s|save]}} > {{path/to/ip_rules.dat}}` - Restore all rules from a file: -`ip {{[ru|rule]}} restore < {{path/to/ip_rules.dat}}` +`sudo ip {{[ru|rule]}} {{[r|restore]}} < {{path/to/ip_rules.dat}}` diff --git a/pages/linux/ip.md b/pages/linux/ip.md index 40083a3ea7..5255558fa6 100644 --- a/pages/linux/ip.md +++ b/pages/linux/ip.md @@ -26,12 +26,12 @@ - Make an interface up/down: -`ip {{[l|link]}} set {{interface}} {{up|down}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{interface}} {{up|down}}` - Add/Delete an IP address to an interface: -`ip {{[a|address]}} add/del {{ip}}/{{mask}} dev {{interface}}` +`sudo ip {{[a|address]}} {{add|delete}} {{ip}}/{{mask}} dev {{interface}}` - Add a default route: -`ip {{[r|route]}} add default via {{ip}} dev {{interface}}` +`sudo ip {{[r|route]}} {{[a|add]}} default via {{ip}} dev {{interface}}`