LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2014, 09:54 AM   #1
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 139

Rep: Reputation: 16
Linux Port


how to check particular port status used by users in linux.

say an example-

If vsftpd / named running by user XX, how do i know port 21 / 53 are using by user XX

from top -c, i can view the pid and user name.. but here i want to grep this info from port number.

Thanks
 
Old 05-09-2014, 10:03 AM   #2
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 139

Original Poster
Rep: Reputation: 16
Found one link

http://www.cyberciti.biz/faq/what-pr...en-linux-port/

Any more suggestion?
 
Old 05-09-2014, 10:13 AM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,208

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
Do you mean something like:

Code:
fuser 21/tcp
(grab process number from list)

Code:
ps aux | grep 1234
username of the process is on the left
 
Old 05-09-2014, 10:21 AM   #4
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 139

Original Poster
Rep: Reputation: 16
correct.
 
Old 05-09-2014, 01:30 PM   #5
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 517
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Code:
lsof -i 4 | grep 1234
is another way to do it
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration