Difference between revisions of "Shells ports"
imported>Wikiadmin |
imported>Wikiadmin |
||
Line 1: | Line 1: | ||
<big>Open ports</big> | <big>Open ports</big> | ||
− | + | ||
As a shell user there is a range of ports you may use to run services, this range is ports 5000 to 5500. (Both tcp and udp) | As a shell user there is a range of ports you may use to run services, this range is ports 5000 to 5500. (Both tcp and udp) | ||
− | + | ||
<big>port command</big> | <big>port command</big> | ||
− | + | ||
There is a custom made command available from your shell to check which ports are in use.<br /> | There is a custom made command available from your shell to check which ports are in use.<br /> | ||
− | This is the 'port' command. | + | This is the 'port' command.<br /> |
− | </ | + | |
− | < | + | |
− | Usage of the port command: | + | <big>Help! Someone is using my port!</big> |
+ | |||
+ | :Ports are shared resources, if you're not using yours for a bit, someone else may take the port you were using before. | ||
+ | :If you have a good reason to lay claim to a specific port, please contact an admin and we'll see what can be done. | ||
+ | |||
+ | |||
+ | <big>Usage of the port command:</big> | ||
:port -a will show you the available ports | :port -a will show you the available ports | ||
:port -s <port> will check if that port is available to you | :port -s <port> will check if that port is available to you | ||
− | + | ||
− | < | + | <big>Examples of how to use the port command:</big> |
− | Examples of how to use the port command:< | + | Find out if port 5001 is in use:<br /> |
− | Find out if port 5001 is in use: | ||
<pre> | <pre> | ||
coolfire@Lydia:~$ port -s 5001 | coolfire@Lydia:~$ port -s 5001 | ||
Line 27: | Line 32: | ||
coolfire@Lydia:~$ | coolfire@Lydia:~$ | ||
</pre> | </pre> | ||
− | </ | + | <br /> |
+ | What you can see here is that port number 5001 is in use already.<br /> | ||
+ | You are not given any information about what process is running on the port as you are not root. |
Revision as of 18:27, 17 September 2010
Open ports
As a shell user there is a range of ports you may use to run services, this range is ports 5000 to 5500. (Both tcp and udp)
port command
There is a custom made command available from your shell to check which ports are in use.
This is the 'port' command.
Help! Someone is using my port!
- Ports are shared resources, if you're not using yours for a bit, someone else may take the port you were using before.
- If you have a good reason to lay claim to a specific port, please contact an admin and we'll see what can be done.
Usage of the port command:
- port -a will show you the available ports
- port -s <port> will check if that port is available to you
Examples of how to use the port command:
Find out if port 5001 is in use:
coolfire@Lydia:~$ port -s 5001 (No info could be read for "-p": geteuid()=1000 but you should be root.) State for port 5001: In use Process info: - Done. coolfire@Lydia:~$
What you can see here is that port number 5001 is in use already.
You are not given any information about what process is running on the port as you are not root.