Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ nics Public

Display information about Network Interface Cards (NICs). The same output is presented across platforms.

License

Notifications You must be signed in to change notification settings

jftuga/nics

Repository files navigation

nics

Cross-platform command line tool to display information about Network Interface Cards (NICs). This program's output is easier to read compared to ipconfig, ip, or ifconfig.

Usage

nics: Display information about Network Interface Cards (NICs)
usage: nics [options]
 -a	show all details on ALL interfaces, includes DHCP info on Windows
 -d	show debug information
 -i string
 	interface name
 -v	show program version

Installation

  • Binaries for Linux, macOS and Windows are provided in the releases section.
  • macOS and Linux: brew tap jftuga/homebrew-tap; brew update; brew install jftuga/tap/nics

Examples

MacOS

$ nics
+------+----------------+-------------------+------+--------------------------------+
| NAME | IP | MAC ADDRESS | MTU | FLAGS |
+------+----------------+-------------------+------+--------------------------------+
| en0 | 172.22.7.13/24 | be:f4:dd:cc:bb:aa | 1500 | up|broadcast|multicast|running |
+------+----------------+-------------------+------+--------------------------------+
+------+-------------+---------------------+---------------------+--------------------+
| NAME | DHCP SERVER | LEASE START | LEASE EXPIRATION | LEASE DURATION |
+------+-------------+---------------------+---------------------+--------------------+
| en0 | 172.22.7.1 | 03/22/2025 04:21:32 | 03/23/2025 04:21:32 | 1 day |
+------+-------------+---------------------+---------------------+--------------------+
+------------+------------+------------+
| GATEWAY | DNS 1 | DNS 2 |
+------------+------------+------------+
| 172.22.7.1 | 172.22.7.2 | 172.22.7.3 |
+------------+------------+------------+

Windows

C:\GitHub\nics>nics
+----------+----------------+-------------------+------+------------------------+
| NAME | IPV4 | MAC ADDRESS | MTU | FLAGS |
+----------+----------------+-------------------+------+------------------------+
| Ethernet | 172.16.7.89/24 | 98:ff:aa:cb:24:a0 | 1500 | up|broadcast|multicast |
+----------+----------------+-------------------+------+------------------------+
+-------------+-------------+---------------------+---------------------+
| IP | DHCP SERVER | LEASE RENEWED | LEASE EXPIRES |
+-------------+-------------+---------------------+---------------------+
| 172.22.7.89 | 172.22.7.1 | 2025年03月22日 06:41:44 | 2025年03月22日 08:41:44 |
+-------------+-------------+---------------------+---------------------+
+------------+------------+------------+
| GATEWAY | DNS1 | DNS2 |
+------------+------------+------------+
| 172.22.7.1 | 172.16.7.2 | 172.16.7.3 |
+------------+------------+------------+

Linux

pi@raspberrypi:~ $ nics -a
+---------+---------------+------------------------------+-------------------+-------+-----------+
| NAME | IPV4 | IPV6 | MAC ADDRESS | MTU | FLAGS |
+---------+---------------+------------------------------+-------------------+-------+-----------+
| lo | 127.0.0.1/8 | ::1/128 | | 65536 | up |
| | | | | | loopback |
+---------+---------------+------------------------------+-------------------+-------+-----------+
| eth0 | 172.16.7.6/24 | fe80::51d3:4fc2:5a11:3abc/64 | b8:27:eb:b2:ea:11 | 1500 | up |
| | | | | | broadcast |
| | | | | | multicast |
+---------+---------------+------------------------------+-------------------+-------+-----------+
| wlan0 | | | b8:27:eb:c4:4e:2a | 1500 | up |
| | | | | | broadcast |
| | | | | | multicast |
+---------+---------------+------------------------------+-------------------+-------+-----------+
| docker0 | 172.17.0.1/16 | | 02:42:60:1b:aa:30 | 1500 | up |
| | | | | | broadcast |
| | | | | | multicast |
+---------+---------------+------------------------------+-------------------+-------+-----------+
+------------+-----------+-------+
| GATEWAY | DNS 1 | DNS 2 |
+------------+-----------+-------+
| 172.16.7.1 | 127.0.0.1 | |
+------------+-----------+-------+

Linux

jftuga@debian:~$ nics -a
+---------+---------------+------------------------------+-------------------+-------+-----------+
| NAME | IPV4 | IPV6 | MAC ADDRESS | MTU | FLAGS |
+---------+---------------+------------------------------+-------------------+-------+-----------+
| lo | 127.0.0.1/8 | ::1/128 | | 65536 | up |
| | | | | | loopback |
+---------+---------------+------------------------------+-------------------+-------+-----------+
| enp3s0 | 172.22.7.6/24 | fe80::51d3:4fc2:face:6b4c/64 | d4:b4:e7:aa:73:c2 | 1500 | up |
| | | | | | broadcast |
| | | | | | multicast |
+---------+---------------+------------------------------+-------------------+-------+-----------+
| docker0 | 172.17.0.1/16 | | 02:42:60:42:af:a3 | 1500 | up |
| | | | | | broadcast |
| | | | | | multicast |
+---------+---------------+------------------------------+-------------------+-------+-----------+
+------------+------------+------------+
| GATEWAY | DNS 1 | DNS 2 |
+------------+------------+------------+
| 172.22.7.1 | 172.22.7.2 | 172.22.7.3 |
+------------+------------+------------+

About

Display information about Network Interface Cards (NICs). The same output is presented across platforms.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /