ifconfig is deprecated, so probably a good idea to get out of that habit. Particularly if you are using it in scripts.
'ip addr' should give you all the information that 'ifconfig' does. You can also make the output a little less chatty by doing 'ip -o -4 addr' to get IPv4 addresses on one line per interface, or 'ip -o -0 addr' to get MAC addresses displayed similarly. This can make awking / cutting for addresses to use in scripts a little more elegant.
I didn't know about the one-per-line option, so thanks for that.
Commands I use regularly instead of using ifconfig:
# link up/down
ip link set dev eth0 up|down
# add a new address
ip addr add dev eth0 172.16.43.124/24
# to clear all IP addresses from eth0
ip addr flush dev eth0
# delete an address
ip addr del dev eth0 172.16.43.124/24
# add default route
ip route add default via 172.16.43.254
Why would I want to type more to accomplish the same task?
This is the same reason as to why I hated that Linux decided to have an ifconfig for physical interfaces, an iwconfig for wireless interfaces. It seems redundant...
Nothing, as long as it's working for you (your Linux distribution probably patched some of the remaining ifconfig problems themselves). You likely won't have a problem until you want to use network features that were implemented after 2001.
'ip addr' should give you all the information that 'ifconfig' does. You can also make the output a little less chatty by doing 'ip -o -4 addr' to get IPv4 addresses on one line per interface, or 'ip -o -0 addr' to get MAC addresses displayed similarly. This can make awking / cutting for addresses to use in scripts a little more elegant.