Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
memcached -u www-data -m 2048 -d

After I run the above,I've no idea which port it's using ...

share|improve this question
up vote 2 down vote accepted

the default port is 11211

lsof|grep -E '^memcached.*LISTEN'
share|improve this answer

you can use netstat -lp

-l is short form of --listening and -p is short form of --program

For example, to list programs listening on TCP ports (-t or --tcp) and show ports and IPs numerically (-n or --numeric):

$ netstat -nltp

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0*               LISTEN      995/mysqld      
tcp        0      0*               LISTEN      1350/memcached  
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.