Other

Configuring a Static IP Address: Guide for Windows, Linux, macOS

This guide will help you configure a static IP address on your computer. You'll learn how to assign a fixed IP for Windows, Linux, and macOS, which is essential for servers, printers, or remote access.

Updated at February 16, 2026
15-30 minutes
Medium
FixPedia Team
Применимо к:Windows 10/11Ubuntu 22.04macOS Ventura and newer

Introduction / Why This Is Needed

A static IP address is a fixed network address that does not change each time you reconnect to the network. Unlike a dynamic (DHCP) address, it is necessary for:

  • Servers (web, file, game servers) so they are always accessible at the same address.
  • Network printers and devices to make them easy to find on the network.
  • Remote access (RDP, SSH) without needing to discover a new IP address each time.
  • Port forwarding on your router, as port forwarding rules are typically tied to a specific internal IP.

This guide covers setting up a static IP on three major platforms: Windows 10/11, Ubuntu 22.04, and macOS Ventura+. The process consists of four common steps, detailed for each OS.

Prerequisites / Preparation

Before starting the configuration, ensure that:

  1. You have administrator privileges on the target computer.
  2. You know your network parameters. You can find them by running in Command Prompt/Terminal:
    # Windows
    ipconfig /all
    
    # Linux/macOS
    ifconfig
    
    Or through the graphical interface (see steps below). Pay attention to:
    • IPv4 address (e.g., 192.168.1.105)
    • Subnet mask (usually 255.255.255.0)
    • Default gateway (your router's IP, e.g., 192.168.1.1)
    • DNS servers (often match the gateway or are public ones like 8.8.8.8)
  3. The static IP you choose must not conflict with other devices on the network and must not be in your router's DHCP range (it's recommended to use an address at the end of the subnet, e.g., .250). A recommended range: 192.168.1.250192.168.1.254 (if your network is 192.168.1.0/24).

Setting Up a Static IP in Windows 10/11

Step 1: Open Network Settings

  1. Press Win + R, type ncpa.cpl, and press Enter. The Network Connections window will open.
  2. Find the correct adapter (usually Wi-Fi or Ethernet), right-click it, and select Properties.

Step 2: Navigate to IPv4 Settings

  1. In the properties window, select "Internet Protocol Version 4 (TCP/IPv4)" and click Properties.
  2. In the new window, switch the toggle to "Use the following IP address".

Step 3: Enter Parameters

Fill in the fields:

  • IP address: your chosen static address (e.g., 192.168.1.250).
  • Subnet mask: usually 255.255.255.0.
  • Default gateway: your router's IP (e.g., 192.168.1.1).
  • Preferred DNS server: you can specify the gateway or a public DNS (e.g., 8.8.8.8).
  • Alternate DNS server: you can specify a second public one (e.g., 8.8.4.4).

Click OK, close all windows.

Setting Up a Static IP in Ubuntu 22.04 (with GNOME)

Step 1: Open Network Settings

  1. Click the network icon in the top panel (top-right corner) and select "Network Settings" (or "Wired Settings" / "Wi-Fi Settings").
  2. In the window that opens, find the relevant connection (e.g., "Wired" or "Wi-Fi") and click the gear ⚙️.

Step 2: Navigate to IPv4 Settings

  1. In the configuration window, go to the "IPv4" tab.
  2. In the "Method" dropdown, select "Manual".

Step 3: Enter Parameters

Click the "+" (Add) button in the "Addresses" section and enter the data in the format:

IP Address, Subnet Mask, Gateway

Example:

192.168.1.250/24, 192.168.1.1
  • The IP address and subnet mask are specified together via / (/24 corresponds to 255.255.255.0).
  • The gateway is specified separately in the "Gateway" field (you can also enter it in the same line, separated by a comma, but using the separate field is better).

For DNS, enter the addresses in the "DNS" field, separated by commas (e.g., 8.8.8.8, 8.8.4.4).

Click "Apply". Toggle the connection switch to apply the changes.

Setting Up a Static IP in macOS Ventura and Newer

Step 1: Open Network Settings

  1. Open System Settings.
  2. In the sidebar, select "Network".

Step 2: Select Interface and Configure

  1. On the left, select the active interface (e.g., Wi-Fi or Ethernet).
  2. In the main area, click "Details" next to the connection status.
  3. Go to the "TCP/IP" tab.
  4. In the "Configure IPv4" dropdown, select "Manually".

Step 3: Enter Parameters

Fill in the fields:

  • IPv4 Address: the static IP (e.g., 192.168.1.250).
  • Subnet Mask: 255.255.255.0.
  • Router: the gateway (e.g., 192.168.1.1).
  • DNS Servers: add one or more addresses (e.g., 8.8.8.8).

Click "OK", then "Apply".

Verifying the Result

After configuring on any OS, ensure the changes have taken effect:

  1. Refresh the network settings (reconnect the cable/network or run in terminal/command prompt):
    • Windows: ipconfig /release then ipconfig /renew (may not work for static IP; better to simply disable and re-enable the adapter).
    • Linux/macOS: sudo dhclient -r (release) and sudo dhclient (renew) — not needed for static IP; just check with ip addr or ifconfig.
  2. Run a command to view the current IP:
    # Windows
    ipconfig
    
    # Linux/macOS
    ip addr show
    
    Ensure the static address you configured is displayed.
  3. Check gateway and internet connectivity:
    ping <gateway>  # e.g., ping 192.168.1.1
    ping 8.8.8.8
    
    If the ping succeeds, the configuration was successful.

Potential Issues

  • IP address conflict: If another device on the network already has that IP, the connection will not be established. Choose a different address from a free range. You can check this via your router's settings (list of DHCP clients).
  • Incorrect gateway/DNS settings: If an incorrect gateway is specified, you will not have access to other networks and the internet. Clarify the parameters with your network administrator or via your router's settings.
  • No access to the local network: Check that the subnet mask matches your network (usually 255.255.255.0 for home networks). Ensure the IP is in the same subnet as other devices (e.g., if a laptop has 192.168.1.105, the static IP should be 192.168.1.xxx).
  • "Access Denied" error during configuration: Run the settings as an administrator (Windows) or use sudo (Linux/macOS).

F.A.Q.

What is the difference between a static IP and a dynamic (DHCP) IP?
When is it essential to use a static IP?
Can I set up a static IP on the router instead of the computer?
Which IP address is safe to use for static configuration?

Hints

Determine your current network parameters
Disable DHCP in network settings
Enter static network parameters
Test the connection
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community