I'm new to Ubuntu and I've problem with port 6703
i executed this command
ps -ef | grep 6703
and got this result
user 4378 4308 0 09:40 pts/2 00:00:00 grep --color=auto 6703
but can't understand what does that mean ?
I'm new to Ubuntu and I've problem with port 6703
i executed this command
ps -ef | grep 6703
and got this result
user 4378 4308 0 09:40 pts/2 00:00:00 grep --color=auto 6703
but can't understand what does that mean ?
ps
doesn't show network ports, at least not to my knowledge. The more appropriate command to use is netstat
or lsof
.
For instance, if I want to see whether or not my ssh
server is listening on port 22, I can do this:
xieerqi@eagle:~$ sudo netstat -tulpan | grep ":22"
[sudo] password for xieerqi:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1012/sshd
tcp6 0 0 :::22 :::* LISTEN 1012/sshd
Same for lsof, if I want to check a specific port, like 58732
xieerqi@eagle:~$ sudo lsof | grep ":58732"
[sudo] password for xieerqi:
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
firefox 2491 xieerqi 65u IPv4 1948841 0t0 TCP eagle:58732->104.16.113.188:http (ESTABLISHED)
As to why your command returned
user 4378 4308 0 09:40 pts/2 00:00:00 grep --color=auto 6703
That is the only string that was matched in the output of ps
, in other words, grep command itself is the only one on that list. And again, there wouldn't be anything else, because you're looking for ports, and ps
doesnt show ports
netstat
e.g.netstat -nl | grep :6703
or usinglsof
e.g.lsof -i :6703
– steeldriver Nov 14 '15 at 22:39