Windows - Change IP via the command prompt

  • First open the command prompt as administrator:
    • Press the Windows key on your keyboard or click Start to bring up the boot menu.
    • In the search bar, type "cmd".
    • Instead of validating the search, press CTRL + SHIFT + Enter.
  • To change IP and default gateway:
    • netsh int ip set address "local area connection" static 192.168.0.101 255.255.255.0 192.168.0.254 1
    • 188798fcbe6ebd9b16942a1aa0b3214c5fc.jpg
  • To change DNS:
    • netsh int ip set dns "local area connection" static 192.168.0.254 primary
    • PS C:\Users\Administrator> netsh.exe int ip set address "Ethernet 4" static 10.70.92.100 255.255.255.0 10.70.92.214

      PS C:\Users\Administrator> netsh.exe int ip set dns "Ethernet 4" static 10.70.92.214 primary

    • 06f6ab2d56b29269e5badcebd7b910a3bab.jpg

  • This procedure will work, assuming that:
    • The network adapter you're trying to change the IP for named "local area connection". It could also be named as "local area connection 2" or "wireless network connection".
    • Look in your control panel for the correct name
    • The IP you want to set is 192.168.0.101, change this to whatever IP you want to use.
    • The default gateway and DNS are the same as the IP. Change this to match your network config found with the command ipconfig /all

转载于:https://my.oschina.net/u/4137120/blog/3054677

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Command PromptWindows操作系统中的命令行工具。通过打开电脑的命令提示符(Command Prompt),用户可以执行各种命令和操作,例如运行程序、访问文件和文件夹、管理系统设置等。在Command Prompt中,可以使用不同的指令来完成不同的任务,比如安装Python库。对于安装Python库,可以使用以下几种方法: 1. 在命令提示符中使用pip命令进行安装:打开命令提示符,输入"pip install 包名"的指令,然后按回车键即可安装指定的Python库。 2. 使用Anaconda Prompt进行安装:打开Anaconda Prompt(Anaconda集成开发环境中提供的命令行工具),输入"conda install 包名"或者"pip install 包名"的指令,然后按回车键即可安装指定的Python库。 除此之外,还可以使用PyCharm等集成开发环境或Anaconda Navigator等图形界面工具来安装Python库,这些工具提供了更友好的界面和更方便的操作方式。 总结来说,Command PromptWindows操作系统中的命令行工具,可以通过输入不同的指令来执行各种任务,包括安装Python库。而对于安装Python库,可以通过命令提示符中的pip命令或使用Anaconda Prompt等工具来完成。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Python库的几种安装方法:Pycharm、Command Prompt、Anaconda Prompt、Anaconda Navigator;常用conda命令...](https://blog.csdn.net/qq_45780647/article/details/123620613)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值