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时选择第二个配置项

  • 相关阅读:
    全排列和全组合实现
    (原)关于MEPG-2中的TS流数据格式学习
    linux的PAM认证和shadow文件中密码的加密方式
    vim 撤销 回退操作
    memcached解压报错gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now的解决方法
    Linux系统安全之pam后门安装使用详解
    漏洞预警:Linux内核9年高龄的“脏牛”0day漏洞
    linux软链接的创建、删除和更新
    关于“.bash_profile”和“.bashrc”区别的总结
    linux下批量杀死进程
  • 原文地址:https://www.cnblogs.com/kidsitcn/p/10223530.html
Copyright © 2011-2022 走看看