This cheat sheet is designed to briefly reference some of the most commonly used IP commands. Whether you’re a seasoned professional looking to improve your command-line skills or a newcomer eager to explore networking possibilities through ip, you’ll find valuable insights and shortcuts here.
Table of Contents
Installation:
Distribution | Command |
---|---|
Debian/Ubuntu | sudo apt install iproute2 |
CentOS/Fedora/Red Hat | sudo yum install iproute |
NixOS | nix-env -iA nixos.iproute2 |
Usage:
Task | Command |
---|---|
Display all interfaces | ip addr show |
Display a specific interface | ip addr show dev eth0 |
Add an IP address | ip addr add 192.168.1.1/24 dev eth0 |
Delete an IP address | ip addr del 192.168.1.1/24 dev eth0 |
Enable an interface | ip link set dev eth0 up |
Disable an interface | ip link set dev eth0 down |
Add a route | ip route add default via 192.168.1.1 |
Delete a route | ip route del default via 192.168.1.1 |
Show routing table | ip route show |
Monitor interface and traffic | ip monitor |
Flush interface statistics | ip -s -s flush all |
Wrapping Up
This ip cheat sheet has highlighted the tool’s flexibility and power for everything from simple tasks to advanced operations. Mastering ip can significantly boost your networking skills. Keep practising, exploring further resources, and share your findings to deepen your understanding and contribute to the community’s collective knowledge.
You May Also Be Interested In
References
- Linux Foundation – Networking Bridge: This suggests the Linux Foundation website might have resources on network administration, potentially including the
ip
command. You can find it by searching for “https://training.linuxfoundation.org/“. - Ubuntu Community Wiki: This points towards the Ubuntu Wiki, which likely has a page dedicated to the
ip
command. You can find it by searching for “https://help.ubuntu.com/“.