Linux Routing Basics with ip route

Linux routing decides which gateway and interface should be used to reach another network. Older systems often used the route command; on current Linux systems, ip route is the preferred tool. View the routing table ip route A typical default route might look like default via 10.0.0.1 dev eth0. Add a temporary route sudo ip … Read more

Detecting Multiple Ethernet Cards in Linux

When a Linux machine has more than one network card, the first step is to confirm that the kernel can see each device. List network interfaces This shows interfaces such as eth0, eth1, ens33 or enp0s3, depending on the Linux distribution and naming scheme. Check PCI network hardware Check driver messages If a card is … Read more

DNS Search Domains in Linux

DNS search domains let a Linux system resolve short hostnames by automatically appending one or more domain names. Example If the search domain is example.com, a lookup for server1 may also try server1.example.com. Check resolver configuration You may see lines such as: Test name resolution On many modern distributions, /etc/resolv.conf may be managed by NetworkManager, … Read more

Share an Internet Connection from Linux with NAT

A Linux system can act as a gateway for devices on a private LAN. Older documentation often called this IP masquerading; today the same idea is usually described as NAT or source NAT. What you need One interface connected to the upstream network or Internet. One interface connected to the private LAN. IP forwarding enabled. … Read more

Mounting Windows Shares in Linux

Windows network shares can be accessed from Linux using CIFS/SMB. This is useful when a Linux machine needs to read or write files on a Windows share or NAS. Install CIFS tools Create a mount point Mount the share manually You will normally be prompted for the password. Avoid putting passwords directly into commands or … Read more

Check Linux Network Configuration

To understand a Linux system’s network configuration, check its addresses, routes, DNS settings, and listening services. Older commands such as ifconfig and route still appear in historical documentation, but the ip command is preferred on modern systems. IP addresses and interfaces ip addr ip link Routes and default gateway ip route DNS configuration cat /etc/resolv.conf … Read more

Useful Linux Networking Commands

Modern Linux networking work is usually built around the ip, ss, ping, traceroute, and DNS lookup tools. Older commands such as ifconfig, route, and netstat may still be available but are no longer the preferred defaults on many distributions. Interfaces and addresses ip addr ip link Routing ip route Listening sockets ss -tulpn Connectivity and … Read more