Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 如何找出进程正在使用的端口号以及使用特定端口号的进程_Linux_Localhost_Openhab - Fatal编程技术网

Linux 如何找出进程正在使用的端口号以及使用特定端口号的进程

Linux 如何找出进程正在使用的端口号以及使用特定端口号的进程,linux,localhost,openhab,Linux,Localhost,Openhab,我是openhab的初学者,在启动服务器/etc/init.d/openhab2 start后,我得到了[ok]启动openhab2(通过systemctl):openhab2.service,但我仍然无法通过http://localhost:8080/ 我想知道: 哪个进程正在使用端口8080 哪个端口运行openhab 谢谢您可以使用lsof lsof | grep TCP | grep 8080和lsof | grep openhab | grep TCP 如果某个进程分叉,而子进程正在使

我是openhab的初学者,在启动服务器
/etc/init.d/openhab2 start
后,我得到了
[ok]启动openhab2(通过systemctl):openhab2.service
,但我仍然无法通过
http://localhost:8080/
我想知道:

哪个进程正在使用端口8080

哪个端口运行openhab


谢谢

您可以使用
lsof

lsof | grep TCP | grep 8080
lsof | grep openhab | grep TCP

如果某个进程分叉,而子进程正在使用某个端口,则该进程可能无法按预期工作