3 ms·
I really do not like the default UI in ip. You have to remember a lot of weird stuff to get useful information. The default listing is compressed, hard to read,
by djsumdog 7y ago
I really do not like the default UI in ip. You have to remember a lot of weird stuff to get useful information. The default listing is compressed, hard to read, and noisy. Then I saw someone who had these aliases:
alias ipa 'ip -br -color a'
alias ipl 'ip -br -color link'
Night and day! I try to not use the aliases because I'm often on servers without them, but the options for brief and color with the command to list adapters or links at the end it one all sys admins should memorize. It returns output that isn't terrible.
- peterwaller 7y agoNice hint, thanks :) According to the manpage, -color can be shortened to -c and link shortened to `l`, as `addr` can be shortened to `a`. -br stands for -brief, which knowing makes it easier to remember. ip -br -c a ip -br -c l Now I need the aliases less.
- hashhar 7y agoThanks for sharing. That is very useful. In case somebody is wondering the output looks like: $ ip -br -color a eth0 x.x.x.x/16 xxxx::xxxx:xxxx:xxxx:xxxx/64 lo 127.0.0.1/8 ::1/128 wifi0 x.x.x.x/24 xxxx::xxxx:xxxx:xxxx:xxxx/64 wifi1 x.x.x.x/16 xxxx::xxxx:xxxx:xxxx:xxxx/64 wifi2 x.x.x.x/16 xxxx::xxxx:xxxx:xxxx:xxxx/64 $ ip -br -color link eth0 xx:xx:xx:xx:xx:xx <> lo 00:00:00:00:00:00 <LOOPBACK,UP> wifi0 xx:xx:xx:xx:xx:xx <BROADCAST,MULTICAST,UP> wifi1 xx:xx:xx:xx:xx:xx <> wifi2 xx:xx:xx:xx:xx:xx <>
- xelxebar 7y agoAn alternative: alias ip='ip -brief -color' which propogates the options to everything. Then if you need the full output, just call ip without the alias: $ \ip a $ \ip l