Skip to content

Linux ifconfig Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux ifconfig Guide

Complete beginner-friendly guide to ifconfig on Linux, covering Arch Linux, CachyOS, and other distributions including network interface configuration, IP address management, and network setup.


Table of Contents

  1. Understanding ifconfig
  2. ifconfig Installation
  3. ifconfig Basics
  4. Interface Configuration
  5. Troubleshooting

Understanding ifconfig

What is ifconfig?

ifconfig configures network interfaces.

Uses:

  • Configure interfaces: Set up network interfaces
  • View interfaces: Show interface information
  • IP addresses: Set IP addresses
  • Network setup: Configure network

Note: Modern alternative is ip command.


ifconfig Installation

Install ifconfig

Arch/CachyOS:

# Install net-tools
sudo pacman -S net-tools

Debian/Ubuntu:

sudo apt install net-tools

Fedora:

sudo dnf install net-tools

ifconfig Basics

View Interfaces

Basic usage:

# View all interfaces
ifconfig

# Shows all network interfaces

Specific Interface

Interface info:

# Specific interface
ifconfig eth0

# Shows interface information

Interface Configuration

Set IP Address

Configure IP:

# Set IP address
sudo ifconfig eth0 192.168.1.100

# Sets IP address

Set Netmask

Configure netmask:

# Set IP and netmask
sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0

# Sets IP and subnet mask

Troubleshooting

ifconfig Not Found

Check installation:

# Check ifconfig
which ifconfig

# Install if missing
sudo pacman -S net-tools

Summary

This guide covered ifconfig usage, interface configuration, and network setup for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally