Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically detect ports #10

Open
mikew opened this issue Oct 6, 2024 · 0 comments
Open

Automatically detect ports #10

mikew opened this issue Oct 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mikew
Copy link
Owner

mikew commented Oct 6, 2024

I have no idea how to do this efficiently, but it's really handy that VSCode Remote does it.

# works on macos and linux
lsof -i4 -n -P | grep LISTEN | awk '{ print $9 }' | cut -d : -f 2
# or
ss -etlpn | grep "uid:$(id -u)" | awk '{ print $4 }' | cut -d : -f 2

Gets us part of the way

@mikew mikew added the enhancement New feature or request label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant