Forrest logo
back to context overview

ip

List of commands for ip:

  • ip:ai:834fc Displays the IP addresses and network interfaces
    $ ip addr show
    try on your machine
    explain this command
  • ip:ai:abf09 This command will display the default gateway's IP address
    $ ip route show default | awk '/default/ {print $3}'
    try on your machine
    explain this command
  • ip:ai:df68e This command retrieves the local IP address assigned to your Linux machine.
    $ ip addr show | grep 'inet ' | awk '{print $2}' | cut -d '/' -f 1
    try on your machine
    explain this command
  • ip:ai:efb91 Get the IP address of krunvm
    $ ip addr show docker0 | grep -Po 'inet \K${\d.}+'
    try on your machine
    explain this command
  • ip:ai:f3b13 Show network interfaces and their addresses
    $ ip addr
    try on your machine
    explain this command
  • ip:tldr:0f057 ip: List interfaces with brief link layer info.
    $ ip -brief link
    try on your machine
    explain this command
  • ip:tldr:1cbdb ip: Display the routing table.
    $ ip route
    try on your machine
    explain this command
  • ip:tldr:7516a ip: Add/Delete an IP address to an interface.
    $ ip addr add/del ${ip}/${mask} dev ${interface}
    try on your machine
    explain this command
  • ip:tldr:be204 ip: List interfaces with brief network layer info.
    $ ip -brief address
    try on your machine
    explain this command
  • ip:tldr:c172f ip: Add a default route.
    $ ip route add default via ${ip} dev ${interface}
    try on your machine
    explain this command
  • ip:tldr:da0b6 ip: Make an interface up/down.
    $ ip link set ${interface} up/down
    try on your machine
    explain this command
back to context overview