How to configure the network on Ubuntu

How to configure the network on Ubuntu

Set IP automatically via dhcp

vi /etc/network/interfaces
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
Restart network
sudo /etc/init.d/networking restart

Set static IP

vi /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.79.130
netmask 255.255.255.0
gateway 192.68.1.1

Restart network
sudo /etc/init.d/networking restart

Support Our Threat Intelligence

If you find our technology report and cybersecurity news helpful, consider supporting our work.

Crypto QR Code
USDT (TRC20):
TN8BdV8cp4T1Cd28gK9qTAnZknzzuwyUtm
USDT (ERC20):
0x3725e1a7d3bc5765499fa6aaafe307fabcd75bce