https://github.com/jftuga/nics
Display information about Network Interface Cards (NICs). The same output is presented across platforms.
https://github.com/jftuga/nics
command-line command-line-tool cross-platform golang ifconfig ipconfig network-interfaces networking
Last synced: 4 months ago
JSON representation
Display information about Network Interface Cards (NICs). The same output is presented across platforms.
- Host: GitHub
- URL: https://github.com/jftuga/nics
- Owner: jftuga
- License: mit
- Created: 2019-08-04T03:09:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-31T03:15:57.000Z (over 1 year ago)
- Last Synced: 2024-08-01T03:29:07.361Z (over 1 year ago)
- Topics: command-line, command-line-tool, cross-platform, golang, ifconfig, ipconfig, network-interfaces, networking
- Language: Go
- Homepage:
- Size: 51.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps-in-a-csv - nics - Display information about Network Interface Cards (NICs); the same output is presented across platforms. (<a name="networking"></a>Networking)
README
# 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](https://github.com/jftuga/nics/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 |
+------------+------------+------------+
```