Using the ifconfig Command
The ifconfig command is part of the net-tools package, which may not be installed by default on newer distributions because it has been deprecated in favor of the ip command from the iproute2 package.
Install net-tools package
If you need to use ifconfig, you can install it using the following command:
sudo apt install net-tools -y
Displaying Interface Information
To display the current configuration for all active interfaces, simply run:
ifconfig
Information about a specific interface:
ifconfig eth0
Enabling / Disabling Interfaces
To enable an interface, you can use:
# Enable interface
ifconfig eth0 up
# Disable interface
ifconfig eth0 down
Configure IP for eth0 interface
To set IP Adress to the interface you can type:
ifconfig eth0 192.168.19.40 netmask 255.255.255.0
This change is not persistent across reboots!