IP Address Configuration
Unit: 4 Lesson: 2
but what if i was special...?
Each OS has their own way of setting up a static IP address for their host system using their terminal.
*The most universal way to edit IP configurations on Linux distributions is to edit text files containing the configuration values using Nano or Vi(m). View the example.
| OS | Command | Description |
|---|---|---|
| Microsoft-Windows | cmd: netsh interface ip set address "Ethernet" dhcp |
Use an IP address automatically assigned by Dynamic-Host-Configuration-Protocol. |
| - | cmd: netsh interface ip set address "Ethernet" static <ip address> <subnet mask> <default gateway address> |
Assign a static IP address, the subnet mask, and the IP address of the default gateway. |
| - | cmd: netsh interface ip show config |
Show the current IP configuration. |
| - | Powershell: Get-NetAdapter |
Show the current enabled network interfaces. |
| - | Powershell: Get-NetIPAddress |
Show the current IP configuration. |
| - | Powershell: New-NetIPAddress or Set-NetIPAddress |
Create a new IP configuration, or modify an existing one. |
| Linux | terminal: ip addr show |
Show all network interfaces and their IP configurations. |
| - | terminal: cd /etc/sysconfig/network-scripts |
Navigate to the folder containing the configuration files for each interface. |
| - | terminal: nano ifcfg-<interface id> |
Edit the configuration file for a specific network interface. |
| #Netplus |