1. install net-tools
$ sudo apt install net-tools [sudo] password for wsd02: Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: libflashrom1 libftdi1-2 Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: net-tools 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. Need to get 204 kB of archives. After this operation, 819 kB of additional disk space will be used. Get:1 http://jp.archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60+git20181103.0eebece-1ubuntu5 [204 kB] Fetched 204 kB in 0s (948 kB/s) Selecting previously unselected package net-tools. (Reading database ... 220496 files and directories currently installed.) Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1ubuntu5_amd64.deb ... Unpacking net-tools (1.60+git20181103.0eebece-1ubuntu5) ... Setting up net-tools (1.60+git20181103.0eebece-1ubuntu5) ... Processing triggers for man-db (2.10.2-1) ...
2. ifconfig
$ ifconfig enp2s0: flags=4163mtu 1500 inet 192.168.1.140 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 2405:6585:a320:4f00:428d:5cff:fe39:387d prefixlen 64 scopeid 0x0 inet6 fe80::428d:5cff:fe39:387d prefixlen 64 scopeid 0x20 ether 40:8d:5c:39:38:7d txqueuelen 1000 (Ethernet) RX packets 119829 bytes 16363195 (16.3 MB) RX errors 0 dropped 81316 overruns 0 frame 0 TX packets 13798 bytes 2701560 (2.7 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 200 bytes 21444 (21.4 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 200 bytes 21444 (21.4 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0