grep Command in Linux : What is grep Command ?
Linux Create And Remove Directory
Linux Create Users : How To Create Users In Linux
Variables In Snowflake In Hindi | Snowflake Variables In Hindi
PHP var_export() Function In Hindi | var_export() In PHP In Hindi
async - await In JavaScript In Hindi | JS async - await In Hindi
What is Hub? and How Hub works?
JavaScript Object keys, values, entries : Object methods in JS
If tutorials available on this website are helpful for you, please whitelist this website in your ad blocker😭 or Donate to help us ❤️ pay for the web hosting to keep the website running.
netstat
command की full form network statistics है यह एक networking tool जिसका use troubleshooting , configuration और किसी network पर connections के लिए monitoring tool की तरह use किया जाता है। incoming और outgoing connections, routing tables, port listening, और usage statistics को netstat
command द्वारा ही monitoring किया जाता है।
इस article में हम netstat की कुछ basic और important commands के बारे में बात करेंगे ।
By default , system में netstat install नहीं होता है , इसे use करने से पहले आपको install करना पड़ेगा। Install करने के लिए नीचे दी गयी commands को run करें।
sudo apt update sudo apt install netstat
install ही जाने के बाद , अब आप netstat
command use कर सकते हैं।
current network पर listening ports list करने के लिए netstat -a
command use की जाती है। ये command run करने पर आपको काफी information देखने को मिलेगी। हालाँकि netstat
command के साथ आप additional options pass कर सकते हैं।
netstat -a
netstat के सभी options को देखने के लिए आप , man netstat
या netstat --help
command run करके देख सकते हैं।
man netstat netstat --help
-a
option pass करने पर आपको काफी information देखने को मिलती है , उसमे से सिर्फ TCP connections list करने के लिए -t
option use करें।
netstat -at
इसी तरह से सभी UDP connections list करने के लिए -au
option pass करें।
netstat -au
network पर सभी active listening ports (TCP और UDP) list करने के लिए netstat -l
command का use किया जाता है।
netstat -l
हालाँकि आप अपनी need के according listening ports filter करने के लिए एक साथ -ut
, -lut
, -lu
या -lt
भी pass कर सकते हैं।
netstat -tunlp command का use सभी active UDP + TCP ports को list करने के लिए किया जाता है , इस command में use किये गए options का मतलब इस तरह से है-
t : TCP
u : UDP
n : Numeric
l : listening
p : Program to show PID
netstat -tunlp
Normally grep
Command का use key के base पर search करने के लिए किया जाता है। और netstat
command के साथ grep का use करके port connection को key के base पर filter कर सकते हैं।
For Example , सभी listening https , programs और ports list करने के लिए कुछ इस तरह से command run करेंगे।
netstat -ap | grep https
protocol को ascending order में sort करके सभी network statistics को pull और view करने के लिए -s
option use किया जाता है।
netstat -s
इस पर आप need के according filters भी apply कर सकते हैं, जैसे -
netstat -st
: for TCP statistics
netstat -su
: for UDP statistics
Loading ...
Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)
Get connected with me. :) LinkedIn Twitter Instagram Facebook