LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-06-2004, 04:13 PM   #1
Dakkar
Member
 
Registered: Dec 2003
Location: Turkey
Distribution: Suse
Posts: 89

Rep: Reputation: 15
Port Number?


How can i see the active port number on linux and the program name which is using that port?

thanks
 
Old 11-06-2004, 04:56 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 171Reputation: 171
netstat -l -p
 
Old 11-06-2004, 04:56 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Read the netstat man page, particularly noting the -p option.
 
Old 11-06-2004, 05:10 PM   #4
Dakkar
Member
 
Registered: Dec 2003
Location: Turkey
Distribution: Suse
Posts: 89

Original Poster
Rep: Reputation: 15
thanks

how can i close theport or the program that is using that port
 
Old 11-06-2004, 05:16 PM   #5
mAineAc
Member
 
Registered: Nov 2000
Location: Hermon, ME
Distribution: slackware
Posts: 201

Rep: Reputation: 30
well the program ou can kill with kill -9 pid# to close a port comment it out of inetd.conf and restart
 
Old 11-06-2004, 05:50 PM   #6
hari_seldon99
Member
 
Registered: Jun 2003
Location: Front of PC
Distribution: Linux Mandrake
Posts: 212

Rep: Reputation: 30
Best command is
"netstat -tap|grep LISTEN"

Thats gives you the list of all servers listening for connection requests from the internet.

Also, you can use GUI's (gnome-network-conf or knetmap or something along those lines is the command to the gui that has a netstat menu u can use in case u don't want to read man pages or remember a whole bunch of flags)

shut off unnecessary services using kill (make sure they're not set as symlinks in /etc/rc.d/rc<whatever>.d/ or else they'll start up again the next time u reboot). U can use GUI's to do that too (like tksysv or ksysv).
 
  


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
port number. bruse Linux - Networking 1 11-28-2005 02:13 PM
Port number.... help rajsun Programming 2 04-12-2005 09:20 AM
Ip and port number Alien18 Linux - Networking 1 09-13-2004 09:40 PM
Changing port number cli_man Linux - General 2 04-20-2002 08:50 AM
right port number gogo Linux - General 1 05-07-2001 03:52 PM

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

All times are GMT -5. The time now is 08:30 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