zoukankan      html  css  js  c++  java
  • windows系统相关命令及问题排查实践

    1. 如何查看哪个端口被哪个程序占用?

    Netstat –ano|findstr "80" ->找到监听80端口的pid

    tasklist|findstr “<PID号>”-->从pid查找到对应的程序

    taskkill /pid 6040 /F -->杀死对应进程

    2. android-studio或者其他ide需要下载被qiang的资源时,可以使用类似下面的sock代理

    http://127.0.0.1:2xxx/echo-pac?t=8xsdd00

     3. 如果文件被僵尸进程打开了,如何找到并杀死对应进程以便可以删除对应的文件?

    可以使用win10下的资源监视器,也可以使用windows自己的process explorer增强工具。

    windows search indexer不工作解決方案:

    通过管理员权限打开powershell,随后执行以下命令后重启:

    https://answers.microsoft.com/en-us/windows/forum/all/windows-10-search-indexing-not-working/ff3a954d-d474-42f3-a183-9acc170481ac

    $manifest = (Get-AppxPackage Microsoft.WindowsStore).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest

    睡眠恢复的文件hyberfil.sys挪移到d盘

    https://www.isunshare.com/windows-10/move-windows-10-hiberfilsys-to-another-volume-to-free-up-c-volume-space.html

    老板键调出运行命令窗口: Windows key 

    用户和组管理工具 lusrmgr.msc

    如何disable掉win7的自动休眠功能?

    1. regedit调出注册表编辑器

    2. 搜索到CurrentPowerPolicy

    3. 删除这个键即可

    或者以下解决方案:

    md打开regedit

    依次索引如下

    计算机HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWindowsControl PanelDesktop
    将ScreenSaveActive置为0
    将ScreenSaveIsSecure置为1
    将ScreenSaveTimeOut置为0

    删除screenSave这个键 ,重新注销登录

    win10下git-bash无法正确识别laravel php artisan的彩色输出问题

    解决方案,git bash右键后的Terminal选项卡中选择vt220的term模式,而不是默认的term

    docker exec -it 或者python, php交互式工作在git bash中运行出错

    the input is not a TTY. If you are using mintty, try prefixing the command with 'winpty'

    如果你使用git bash的console,执行docker exec -it dockercontainer /bin/bash命令时,就可能出现以下tty不兼容的问题。根本原因时gitbash默认安装可能使用的是Mintty终端而非windows cmd.

    解决方案有两个:

    1. alias docker= "winpty docker", alias php="winpty php";

    2. 安装git bash时选择第二个配置项

  • 相关阅读:
    周末之个人杂想(十三)
    PowerTip of the DaySorting Multiple Properties
    PowerTip of the DayCreate Remoting Solutions
    PowerTip of the DayAdd Help to Your Functions
    PowerTip of the DayAcessing Function Parameters by Type
    PowerTip of the DayReplace Text in Files
    PowerTip of the DayAdding Extra Information
    PowerTip of the DayPrinting Results
    Win7下IIS 7.5配置SSAS(2008)远程访问
    PowerTip of the DayOpening Current Folder in Explorer
  • 原文地址:https://www.cnblogs.com/kidsitcn/p/10223530.html
Copyright © 2011-2022 走看看