check if service in running to a port in linux 1

check if service in running to a port in linux

sudo lsof -i -P -n | grep LISTEN

Here is what the above code is Doing:
1. sudo – run the command as root
2. lsof – list open files
3. -i -P -n – options to list open files
4. grep LISTEN – filter the output to only show lines containing the word LISTEN

Similar Posts