Windows netsh int ip set address (static IP) equivalent in Linux
Assigns a permanent static IP address to a network interface using NetworkManager.
netsh int ip set address (static IP)
nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual
nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual
nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual
Overview
What this command does
On Windows, "netsh int ip set address (static IP)" is used to configure a static IP address. On Linux, the closest practical mapping shown here is "nmcli con mod". Assigns a permanent static IP address to a network interface using NetworkManager. This reference is grouped under Networking.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows netsh int ip set address (static IP) maps to nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux networking for Windows users.
Practical tasks
Common use cases
Configure a static IP address
Assigns a permanent static IP address to a network interface using NetworkManager.
ip addr add 192.168.1.50/24 dev eth0
Set IP temporarily
nmcli con mod 'Wired' ipv4.addresses 192.168.1.50/24
Set via NetworkManager (permanent)
nmcli con mod 'Wired' ipv4.method manual
Switch to static mode
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
nmcli con mod 'Wired connection 1' ipv4.addresses 192.168.1.50/24
nmcli con mod 'Wired connection 1' ipv4.gateway 192.168.1.1
nmcli con mod 'Wired connection 1' ipv4.dns '8.8.8.8 1.1.1.1'
nmcli con mod 'Wired connection 1' ipv4.method manual
nmcli con up 'Wired connection 1'
Walkthrough
Examples with explanations
# Windows: netsh int ip set address 'Ethernet' static 192.168.1.50 255.255.255.0
# Permanent via NetworkManager:
nmcli con mod 'Wired connection 1' ipv4.addresses 192.168.1.50/24
nmcli con mod 'Wired connection 1' ipv4.gateway 192.168.1.1
nmcli con mod 'Wired connection 1' ipv4.dns '8.8.8.8 1.1.1.1'
nmcli con mod 'Wired connection 1' ipv4.method manual
nmcli con up 'Wired connection 1'
Reference
Common options and variations
| Command or option | Use |
|---|---|
ip addr add 192.168.1.50/24 dev eth0 | Set IP temporarily |
nmcli con mod 'Wired' ipv4.addresses 192.168.1.50/24 | Set via NetworkManager (permanent) |
nmcli con mod 'Wired' ipv4.method manual | Switch to static mode |
nmcli con up 'Wired' | Apply changes |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
The command "nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual" is the same in all three rows, while package or base details differ: Debian/Ubuntu uses apt / NetworkManager; Fedora uses dnf / NetworkManager; Arch uses pacman / NetworkManager.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | apt / NetworkManager | nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual |
Desktop installs often use NetworkManager; servers may use Netplan. |
| Fedora | dnf / NetworkManager | nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual |
NetworkManager is the normal Fedora path. |
| Arch | pacman / NetworkManager | nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual |
Use this if NetworkManager is installed and enabled. |
Keep learning