---
title: "DOS下杀进程"
author: "独家冠名"
date: "2008-08-24T09:56:13Z"
tags: ["C", "C#", "C++", "DOS", "Windows"]
slug: "dos"
draft: false
lastmod: "2008-08-24T09:56:13Z"
id: 232046
url: "https://singlewolf.iteye.com/blog/232046"
---

Windows平台

查看哪些进程在占用端口
在windows命令行窗口下执行：
C:\>netstat -aon|findstr "21"
TCP  192.168.0.110:2933   203.218.28.244:8370   FIN_WAIT_1     3008

端口被进程号为3008的进程占用，继续执行下面命令：

C:\>tasklist|findstr "3008"
Thunder5.exe              3008 Console                 0     29,384 K

迅雷占用该端口

杀掉该进程
C:\>taskkill /PID 3008 /F （其中，F参数为强制性关闭。）

注:有时候会提示
注：有时会出现提示错误：找不到进程“****”，重新输入 tasklist 命令，取得最新PID值

