Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Mar 252010
 

Find out which programs are listening TCP port

Answer:

Use the command: netstat -tlnp

# netstat -tlnp

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     
Mar 202010
 

Install Xdebug for PHP under Ubuntu

Answer:

Xdebug is a very useful debugging extension for PHP, to install under Ubuntu:

# sudo pecl install xdebug
# echo "extension=xdebug.so" > /etc/php.d/xdebug.ini

Restart Apache and that's all.