Joseph Zikusooka (ZIK)<p>💡 Use the 'lsof' command to quickly identify the ports that a specific service is listening on within a Linux system <span class="h-card" translate="no"><a href="https://fosstodon.org/@opensuse" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>opensuse</span></a></span> <span class="h-card" translate="no"><a href="https://fosstodon.org/@fedora" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>fedora</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@climagic" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>climagic</span></a></span> </p><p>Example:<br>SERVICE=sshd; lsof -i -P -n | grep $SERVICE | awk '/LISTEN/ {print $9}' | uniq</p><p><a href="https://mastodon.social/tags/ZikTIPs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ZikTIPs</span></a> <a href="https://mastodon.social/tags/SysAdmins" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SysAdmins</span></a> <a href="https://mastodon.social/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> <a href="https://mastodon.social/tags/Opensource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Opensource</span></a></p>