Latest Posts

What is instup.exe and is it safe? Hacking of black, white and gray hat defined What it is and how to use it? HDG explains: how does GPS work? How To Clean a TV or Monitor Screen (The Right Way) 5 Best Firefox Privacy Add-ons for Online Safety How To Build Your Own Laptop Google Chrome Content Settings: A Full Guide How to Send a Fax from an iPhone or Android Smartphone Automatically Move, Delete, or Copy Files in Windows How to Delete Only Old Emails in Gmail CPU Processor Comparison – Intel Core i9 vs i7 vs i5 vs i3 How to Delete Your Google Search History – A Modern Guide 8 AI Assistants and What They Can Do For You How to Take Screenshots on Nintendo Switch Everything You Should Know About Power Banks How to Record a WhatsApp Video or Audio Call Ryzen 3900X vs Intel i9-9900K – Which CPU Is Truly Better? How to Make Your Social Media Accounts Private Freeware Versus Shareware – What’s The Difference?

The Command Prompt application, also known as the command shell, is found in most Windows NT-based operating systems. Its purpose is to run specific commands to troubleshoot or fix specific Windows problems, perform advanced management functions, and automate tasks via batch files and scripts.

That said, you can also use it to change your IP address if you want to spoof it to get around geoblocks or online bans on sites that impose such restrictions on their content, or to hack your Domain Name System (DNS) servers. change for troubleshooting reasons or to make browsing safer and faster.

In this guide, we are going to show you how to change your IP address and DNS servers using Command Prompt in Windows 10.

How to Change IP Address Using Command Prompt

An IP address contains information about your device, location, your Internet Service Provider (ISP), and browser information.

Changing it is useful if you have a faulty router providing addresses that are used by another computer on the network, or if an invalid address has been accidentally configured. It is also useful if you want to install a new router and reconfigure your home network to use the default IP address range.

The first step in changing your IP address is finding the network name for the interface you want to change.

  • Open an elevated command prompt by typing cmd in the search bar and click Run as administrator
  • Then type netsh interface ipv4 show config In the Command Prompt window, press Enter and scroll down to the desired interface.

In our case, we will customize the Wi-Fi interface, but you can choose the appropriate interface for your case. Note the interface name.

  • Type this command to change the IP address: netsh interface ipv4 set address name=”YOUR INTERFACE NAME” static IP_ADDRESS SUBNET_MASK GATEWAY

In our example, this command looks like this: netsh interface ipv4 set address name=”Wi-Fi” static

This command uses the Wi-Fi interface, sets the IP address to, sets the subnet mask to, and sets the default gateway to

To switch to using an IP address automatically assigned by a DHCP server instead of a static IP address, use the netsh interface ipv4 set address name=”YOUR INTERFACE NAME” source=dhcp order.

How to Change DNS Servers Using Command Prompt

A DNS server holds public IP addresses and related host names in a database and is used to resolve or translate the host names to IP addresses. The server does this by running special software to communicate with other servers through special protocols based on certain requests from the computer.

The conversion process is thoroughly vetted and verified, and it’s done quickly behind the scenes to get information that matches the server the computer is looking for, then tells the original connecting computer where to go so it can connect to that server.

There are several reasons why you might want to change your default DNS server, but the main ones are:

  • Increase your privacy when bypassing a firewall, geoblocking or ISP blocking on a website
  • Increase safety
  • Parental Controls such as blocking websites from your router
  • Speed ​​up your browsing, which your own ISP’s DNS servers may not provide as they are not always reliable or up-to-date

Remark: You can change DNS servers individually for your home network on your router or on computers, smartphone and Chromebook, among other devices

Change DNS Servers with Command Prompt

Follow the steps below to learn how to change DNS servers using Command Prompt.

  • Open an elevated command prompt by typing cmd in the search bar and click Run as administrator
  • Type netsh and press Enter
  • Then type interface ip show config and press Enter
  • Find the network interface whose DNS server you want to change and enter the netsh interface ipv4 set dns name=”YOUR INTERFACE NAME” static DNS_SERVER† This will set your primary DNS server.

From our example above, we changed the IP address for the “Wi-Fi” interface, so we’ll use the same example to change the DNS servers.

For this guide, we’ll be using Google’s primary public DNS server, The command looks something like this: netsh interface ipv4 set dns name=”Wi-Fi” static

  • Then type the netsh interface ipv4 set dns name=”YOUR INTERFACE NAME” static DNS_SERVER index=2 command to set the secondary DNS server. Again, we’ll use Google’s public DNS secondary server,, as an example, which looks like this: netsh interface ipv4 set dns name=”Wi-Fi” static index=2.

Remark: You can use the netsh interface ipv4 set dnsservers name”YOUR INTERFACE NAME” source=dhcp command if you want the network interface to automatically choose DNS settings from a DHCP server. Continuing with our example, this command would look like this: netsh interface ipv4 set dnsservers name”Wi-Fi” source=dhcp


Command Prompt is a great tool to use when you want to change IP addresses and DNS servers. It’s faster and saves you the hassle of having to click through different windows and dialog boxes of the Control Panel interface to get to the IPv4 Properties dialog box to do the same thing.

Was this guide helpful? Let us know by posting your comment in the section below.

Leave a Reply

Your email address will not be published.