netstat - input will give a list of all ports in use on a machine with the service running on that port.
In DOS command type ipconfig and press enter the port number would be displayed
In linux, issue the following command in the terminal.lsof -i TCP | fgrep LISTENOrdo a port scan using a port scanner like nmapex: nmap In Windows, you can do a port scan to get the list of open ports in your computer. For this use, nmap or zenmap (gui of nmap). There could be other ways but this is the one I have experience on.
from command lineICAPORT /PORT:XXX where XXX represents the port number from 0 to 65535
There isn't a generalized way from the command line in Unix to connect to a socket; there are socket libraries you can utilize from within the 'C' language to assign, bind, and connect to a specific socket address. For example: int connect(int s, const struct sockaddr *name, int namelen); In Linux, you can use the 'socket' command to connect to a specific socket as: socket ?options? host port Where the host is the IP address and the port is the port number (giving you the socket address).
By "change port in Linux", I assume you mean changing the default port an application listens or transmits on. This is usually set in the program's settings or configuration file.
Minicom (for the command line) and PuTTy (graphical) can both connect as a client to other computers through a serial port (/dev/ttySx). Minicom can also provide server functionality.
By default it listens on SMTP port 25
1)Type netstat -a -o -n in command prompt. 2) find the PID number for that port number 3) goto task manager and end process the corresponding PID number. Mari Raja - ThoughtFocus Sofware Solution.
Ports are described by 16 bits. 2^16 is 65536 so the highest number is 65535 and port 65536 does not exist.
There is one general command for the UNIX (actual UNIX not Linux) which will yield which port is being used by what service: lsof -i For Linux it is: netstat For more information for either command, please see these sources: lsof http://www-uxsup.csx.cam.ac.UK/security/lsof.HTML netstat http://www-uxsup.csx.cam.ac.UK/security/netstat.HTML Additional : 'netstat' is a standard tcp/ip utility, so it will work on all platforms using tcp/ip, including windows.
SMTP is normally run on port 25, regardless of what operating system is running the service.
The FTP port has been standardized at port 21, so it is highly unlikely it is operating on another port. To change the port, you would have had to change configuration settings. And if you had, you would know what port it was on.