专栏首页技术小黑屋List Ports on Linux

List Ports on Linux

I have often suffered this painful thing.When I start a service but the destination port is always used.So I should list all open ports and kill the occupied application. So This is a short tip for how to list open ports on Linux

1

sudo netstat -tulpn

Note sometimes you should grant the command for a enough access. For a better understanding,please

1

man netstat

or navigate to http://linux.about.com/od/commands/l/blcmdl8_netstat.htm

For Mac Users

1

sudo lsof -i -P | grep -i "listen"

Others

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • BashBites:Loop Through in a Directory

    The trick is really easy. Just to keep record.Here we take the /tmp folder as th...

    技术小黑屋
  • Fix Notification Switching Position Issue

    I once faced with a problem. I wrote a piece of code related with notifcation. E...

    技术小黑屋
  • Dump Table Structure in SQLite3

    Best answer to the question Use PRAGMA table_info

    技术小黑屋
  • Android 相机功能模块相关库

    Android’s video recording APIs are very difficult to figure out, especially sinc...

    用户3004328
  • Parallelism Vs Concurrency

    这是两个英文解释边界都很模糊的单词,翻译到中文里就更让人满头雾水了。网友对这两个词的解释也是各执一词,网友在Stack Overflow 上也问过这个问题Wha...

    Dylan Liu
  • ZOJ 3713 In 7-bit

    Very often, especially in programming contests, we treat a sequence of non-white...

    ShenduCC
  • 如何使用CRM Document Template Profile

    版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。

    Jerry Wang
  • 要玩转这个星际争霸II开源AI,你只需要i5+GTX1050

    Reaver 是一个模块化的深度强化学习框架,可提供比大多数开源解决方案更快的单机并行化能力,支持星际争霸 2、OpenAI Gym、Atari、MuJoCo ...

    机器之心
  • 英文 | 性能大比拼:list.sort()与sorted()

    花下猫语:list.sort() 与 sorted(list) 是常用的列表排序方法,但是,你是否考虑过在占用内存与排序速度上,两者有啥优劣么?今天分享的文章对...

    Python猫
  • .net下模拟不同身份登陆以获取不同权限

    .net下模拟不同身份登陆以获取不同权限     作者:佚名 时间:-- : 出处:互连网 责编:chinaitpower                   ...

    阿新

扫码关注云+社区

领取腾讯云代金券

玩转腾讯云 有奖征文活动