From the course: LPIC-1 Exam 102 (Version 5.0) Cert Prep

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use Nmap and netstat to audit network services

Use Nmap and netstat to audit network services - Linux Tutorial

From the course: LPIC-1 Exam 102 (Version 5.0) Cert Prep

Start my 1-month free trial

Use Nmap and netstat to audit network services

- It's important when we're securing a system to turn off services that are not being used. If it's not running, it's difficult to exploit. To get the status of services on the Linux system that uses system d, you can type in sudo systemctl list-units - -type=service and hit enter. From this output, we can see what the status of each service is. If you only want to show active services, you can search by state. Press Q, bring your line back, and add --state=active and hit enter. These are services that were running, are running, or could be running if they're needed. To get a list of services that are running right now, bring your line back and change the state to running. Press Q, bring your line back, and change active to running, and hit enter. Now we can systematically go through this list, which services we want running, and shut down those we don't. To shut down a service, type sudo systemctl…

Contents