First, read the manual.
man ifconfig
Then, afterwards, you'll understand what ifconfig does. also, ifconfig is considered to be a deprecated tool (i still use it however, it's handy because it's familiar and easy to use).
ifconfig -a
Will display all interfaces.
ip address # will also display similar information.
You might want to do some googling on some basic networking commands and how they work. TLPD has a quick synopsis on some of the most common commands in linux for networking.
My arch system is configured to give older interface names, but the newer names (automatically configured by ubuntu) give newer (more complicated, harder to remember, and type) information.
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.254.3/24 brd 192.168.254.255 scope global dynamic wlan0
valid_lft 82688sec preferred_lft 82688sec
inet6 f::f:f:f:f/64 scope link
valid_lft forever preferred_lft forever
You can see I have 3 interfaces, lo
(for loopback), eth0
(for ethernet), and wlan0
(for wireless). If you don't use the correct interface name, then it won't work.
The following command will bring the interface up if it was down. The Ubuntu Server Guide has some detailed information on how to accomplish configuration, bringing the interface down, and back up.
sudo ip link set eth0 up
ifconfig -a
- is it really namedeth0
? – waltinator Nov 17 '17 at 15:50enp58s0f1
(rather thaneth0
) is your Ethernet. – Chai T. Rex Nov 17 '17 at 18:21