codingstuff.io
ExploreTutorialsProblemsCS Subjects
Get Started
ExploreTutorialsProblemsCS Subjects
Get Started
codingstuff.io

Master the art of building software through interactive tutorials, real-world problems, and guided projects.

Pune, Maharashtra, India

codingstuffmail@gmail.com

Product

  • Explore
  • Tutorials
  • Problems
  • CS Subjects

Company

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 codingstuff.io. All rights reserved.

Built with ❤️ for developers everywhere

/
/
All Tutorials
🐧

Linux & Bash

20 / 60 topics
20Network Configuration21Remote Access22Firewall Management
Tutorials/Linux & Bash/Network Configuration
🐧Linux & Bash

Network Configuration

Updated 2026-05-15
10 min read

Network Configuration

Introduction

In this section, we will delve into the fundamentals of configuring network settings and interfaces in Linux. Understanding how to manage your system's network configuration is crucial for both beginners and intermediate developers. This tutorial will cover essential concepts such as IP addresses, subnet masks, gateways, DNS servers, and how to configure these settings using command-line tools.

Concept

Network Interfaces

Network interfaces are the points where a computer connects to a network. In Linux, these interfaces are typically represented by names like eth0, wlan0, or more commonly in modern systems, enp3s0 for Ethernet and wlp2s0 for Wi-Fi.

IP Addresses

An IP address is a unique identifier assigned to each device on a network. There are two main types of IP addresses:

  1. Static IP Address: A fixed IP address that does not change.
  2. Dynamic IP Address: An IP address that changes periodically, usually managed by a DHCP server.

Subnet Mask

A subnet mask is used to determine which portion of an IP address refers to the network and which portion refers to the host. It helps in defining the boundaries of a network segment.

Gateway

The gateway acts as the entry point to another network. When your computer needs to communicate with a device outside its local network, it sends packets through the default gateway.

DNS Servers

DNS (Domain Name System) servers translate human-readable domain names into IP addresses. They are essential for resolving hostnames to their corresponding IP addresses.

Examples

Checking Network Interfaces

To list all available network interfaces and their current configuration, use the ip command:

Terminal

Configuring a Dynamic IP Address

To configure an interface to obtain its IP address dynamically via DHCP, you can modify the same configuration file as above.

Bash
1auto enp3s0
2iface enp3s0 inet dhcp

Restart the networking service again:

Terminal
Output
PING google.com (172.217.16.196) 56(84) bytes of data.
64 bytes from 172.217.16.196: icmp_seq=1 ttl=53 time=20.3 ms
64 bytes from 172.217.16.196: icmp_seq=2 ttl=53 time=20.1 ms
64 bytes from 172.217.16.196: icmp_seq=3 ttl=53 time=20.2 ms
64 bytes from 172.217.16.196: icmp_seq=4 ttl=53 time=20.4 ms

--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 20.107/20.268/20.451/0.139 ms

What's Next?

In the next section, we will explore how to set up remote access to your Linux system using SSH (Secure Shell). This is a powerful tool that allows you to securely connect to and manage your server from anywhere.

Stay tuned for more tutorials on advanced networking topics and system administration!


PreviousSystem UpdatesNext Remote Access

Recommended Gear

System UpdatesRemote Access