Cov txheej txheem:

Kuv yuav tua cov txheej txheem mloog ntawm qhov chaw nres nkoj li cas?
Kuv yuav tua cov txheej txheem mloog ntawm qhov chaw nres nkoj li cas?

Video: Kuv yuav tua cov txheej txheem mloog ntawm qhov chaw nres nkoj li cas?

Video: Kuv yuav tua cov txheej txheem mloog ntawm qhov chaw nres nkoj li cas?
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Plaub Hlis Ntuj
Anonim

Nrhiav (thiab tua) tag nrho cov txheej txheem mloog ntawm qhov chaw nres nkoj

  1. lsof -n | grep ua Mloog . Bash. Ib txoj hauv kev yooj yim heev.
  2. lsof -i tcp:[ PORT ]Bash. tua tag nrho txheej txheem mloog ntawm ib qho tshwj xeeb chaw nres nkoj siv:
  3. lsof -ti tcp:5900 | xargs tua . Bash. Cov lus txib -t rov qab tsuas yog PID, exaclty rau lub hom phiaj ntawm piping nws qhov chaw, thiab xargs executes tua ntawm txhua kab rov qab.

Hauv qhov no, kuv yuav tua cov txheej txheem siv qhov chaw nres nkoj li cas?

Qhov rai

  1. Qhib lub qhov rais CMD hauv Administrator hom los ntawm kev mus rau Pib> Khiav> hom cmd> right-click Command Prompt, ces xaiv Khiav raws li tus thawj coj.
  2. Siv cov lus txib netstat sau tag nrho cov chaw nres nkoj nquag.
  3. Txhawm rau tua cov txheej txheem no (tus /f yog quab yuam): taskkill /pid 18264 /f.

Ib tug kuj yuav nug, kuv yuav tua qhov chaw nres nkoj 3000 li cas? Tua txheej txheem ntawm Chaw nres nkoj Piv txwv li, koj yuav tsum tau tua txheej txheem khiav ntawm chaw nres nkoj 3000 . Thawj "sudo lsof -t -i: 3000 "yuav rov qab PID ntawm tus txheej txheem khiav ntawm chaw nres nkoj 3000 . Cov txiaj ntsig saum toj no qhia tau hais tias 7279 yog PID ntawm tus txheej txheem ntawm chaw nres nkoj 3000 . Tam sim no koj tuaj yeem siv tua txib rau tua tus txheej txheem.

Dhau li ntawd, kuv yuav tua cov txheej txheem chaw nres nkoj 8080 li cas?

Peb yuav tsum tau khiav ob peb cov lus txib hauv cov lus txib kom tua cov txheej txheem uas siv chaw nres nkoj 8080

  1. Kauj ruam 1: Nrhiav tus txheej txheem id nyob rau hauv lub qhov rais siv hais kom ua prompt. netstat -ano | findstr netstat -ano | findstr
  2. Kauj ruam 2: Tua cov txheej txheem siv cov lus txib kom sai. Taskill /F /PID

Kuv yuav tua cov txheej txheem khiav ntawm qhov chaw nres nkoj tshwj xeeb hauv Linux li cas?

lsof stands rau Daim Ntawv Qhia Qhib Cov Ntaub Ntawv thiab nrog cov kev xaiv tsim nyog lossis cov chij, nws tuaj yeem siv los xa rov qab PID ntawm a txheej txheem ntawm ib co muab chaw nres nkoj . Thaum koj tau txais PID , siv tua txib kom nres ntawd txheej txheem . Qhov no yuav nrhiav tau txheej txheem khiav ntawm 3000 chaw nres nkoj thiab tua nws.

Pom zoo: