What are deprecated? ifconfig netstats route What are the better options? ip ss lsof -iTCP Basic usages Command ip Show / manipulate routing, network devices, interfaces and tunnels
Show ip adresses: ip address or ip a Show network devices: ip link or ip l Show routing table entry: ip route or ip r Use color output: for example ip -c a, ip -c l Command ss Another utility to investigate sockets
What is sed? sed is a “stream editor for filtering and transforming text”. Here is a very detailed tutorial.
Basic usages Use “s” for substitution Basic syntax:
echo "Sunday Monday" | sed 's/day/night/' Sunnight Monday Note that only the first occurrence of day was replaced by night. To replace all, you have to use sed pattern flag /g for global replacement.
echo "Sunday Monday" | sed 's/day/night/g' Sunnight Monnight Flexible delimiters I think we all agree that the following code is ugly: