LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Port (https://www.linuxquestions.org/questions/linux-newbie-8/linux-port-4175504462/)

abhijeetdutta 05-09-2014 09:54 AM

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

abhijeetdutta 05-09-2014 10:03 AM

Found one link

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

Any more suggestion?

szboardstretcher 05-09-2014 10:13 AM

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

abhijeetdutta 05-09-2014 10:21 AM

correct.

DJ Shaji 05-09-2014 01:30 PM

Code:

lsof -i 4 | grep 1234
is another way to do it


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