How to capture only TCP packets in Linux?

0 votes

Hi Guys,

I am new to Linux. I am able to capture packets. But I only require TCP packets. How can I do that?

Oct 4 in Linux Administration by akhtar
• 33,720 points
29 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use tcpdump command for this task. To capture packets based on TCP port, run the following command with option tcp.

$ tcpdump -i eth0 tcp
answered Oct 4 by MD
• 79,930 points

Related Questions In Linux Administration

–1 vote
1 answer

How to get octal file permission in linux?

You can use this: stat -c "%a %n" ...READ MORE

answered Jan 3, 2019 in Linux Administration by Omkar
• 69,030 points
491 views
0 votes
1 answer

How to create a symlink in Linux?

To create a symbolic link, you can ...READ MORE

answered Jan 31, 2019 in Linux Administration by Omkar
• 69,030 points
188 views
0 votes
1 answer

How to find path of software installed in Linux?

There are multiple ways to find the ...READ MORE

answered May 19, 2019 in Linux Administration by Rishi
1,926 views
0 votes
1 answer

How to convert DOS line endings to Linux line endings in vim?

try this; :%s/\r/\r/g READ MORE

answered May 24, 2019 in Linux Administration by Upasana
• 8,620 points
157 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
222 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 11 in Database by Prachi
• 140 points
191 views
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22, 2019 in Database by Mahi
126 views
0 votes
1 answer

How to capture Packets from Specific Interface in Linux?

Hi@akhtar, You can use tcpdump command in your ...READ MORE

answered Oct 3 in Linux Administration by MD
• 79,930 points
32 views
0 votes
1 answer

How to display captured packets in HEX and ASCII in Linux?

Hi@akhtar, To display the packet value you can ...READ MORE

answered Oct 4 in Linux Administration by MD
• 79,930 points
41 views