Difference between revisions of "Shells ports"
imported>Wikiadmin |
imported>Wikiadmin |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | === Open ports === | |
− | As a shell user there is a range of ports you may use to run services, this range is | + | :As a shell user there is a range of ports you may use to run services, this range is port '''5000''' to '''5500'''. (Both tcp and udp) |
− | + | === 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. | :Ports are shared resources, if you're not using yours for a bit, someone else may take the port you were using before. | ||
Line 10: | Line 10: | ||
− | + | === That doesn't seem fair? I was using it first. === | |
+ | |||
+ | :Well, in all honesty every user has as much right to a specific port as the next. | ||
+ | :Based on this, the only fair and maintainable system at this point is simply 'first come, first served'. | ||
+ | |||
+ | |||
+ | === port command === | ||
:There is a custom made command available from your shell to check which ports are in use. | :There is a custom made command available from your shell to check which ports are in use. | ||
Line 16: | Line 22: | ||
− | + | ==== Usage of the port command ==== | |
: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 | ||
− | + | ==== 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:<br /> | ||
<pre> | <pre> | ||
coolfire@Lydia:~$ port -s 5001 | coolfire@Lydia:~$ port -s 5001 | ||
− | |||
State for port 5001: In use | State for port 5001: In use | ||
Process info: | Process info: | ||
Line 32: | Line 38: | ||
coolfire@Lydia:~$ | coolfire@Lydia:~$ | ||
</pre> | </pre> | ||
− | + | ||
− | What you can see here is that port number 5001 is in use already. | + | :What you can see here is that port number 5001 is in use already. |
− | + | :If you are using the port yourself it will show you the PID and process name that is using this port. |
Latest revision as of 08:06, 22 August 2014
Contents
Open ports
- As a shell user there is a range of ports you may use to run services, this range is port 5000 to 5500. (Both tcp and udp)
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.
That doesn't seem fair? I was using it first.
- Well, in all honesty every user has as much right to a specific port as the next.
- Based on this, the only fair and maintainable system at this point is simply 'first come, first served'.
port command
- There is a custom made command available from your shell to check which ports are in use.
- This is the 'port' command.
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 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.
- If you are using the port yourself it will show you the PID and process name that is using this port.