Ubuntu 18.04 missing ifconfig

CC(ChenChih)
Chen-Chih’s Portfolio Page
2 min readJan 3, 2020

Ubuntu 18.04 is missing ifconfig command, we have to used apt install to install. you can use IP a to see your IP Address, but the ifconfig ethttol can’t use need to install net-tools

when you open terminal and type ifconfig will pop this:

root@test-D830MT:~# ifconfig

Command ‘ifconfig’ not found, but can be installed with apt install net-tools

These are the step:

  1. Install apt net-tools will have an error
sudo apt-install ifconfig

Reading package lists… Done
Building dependency tree
Reading state information… Done
Package net-tools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

2. Upgrade your apt first

# apt-get update
# apt-get upgrade

3. After Upgrade use apt install will have an error

E: Package ‘net-tools’ has no installation candidate

rm /var/lib/dpkg/lock-frontend

4. confiigure dpkg

sudo dpkg — configure -a

Note: if still have error maybe apt still upgrading

5. After it ifconfig can be used

6. You can also install ethtool, also need to install it manually

7 After install you can see your ethernet’s speed

#ethtool ‘interface-name’

root@test-D830MT:~# ethtool enp1s0
Settings for enp1s0:
Supported ports: [ TP ]
Supported link modes: 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 2500Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal

2. install net-tools

you might meet

E: Could not get lock /var/lib/dpkg/lock-frontend — open (11: Resource temporarily unavailable)

so just delete it #sudo rm /var/lib/dpkg/lock-frontend

Execute this :

#sudo dpkg — configure -a

and

sudo apt install net-tools

3. ifconfig can work

--

--

CC(ChenChih)
Chen-Chih’s Portfolio Page

I self study technology, and likes to exchange knowledge with people. I try writing complex tech blog into simple and various ways for people to understand.