What I like to know is if network programs still use this file?

I can comment out http port 80 without any effects on firefox:

># http 80/tcp
># http 80/udp

Then I can delete out /etc/services without no serious effects on the system:

>sudo rm -v /etc/services

The best of what I know is to manually enable/disable network services with systemd:

>sudo systemctl enable NAME
>sudo systemctl disable NAME

The next question is how would I get the list of network services to enable/disable all in
one config/script file on linux mint?

Recommended Answers

All 2 Replies

List of enabled/disabled srvices ~$ systemctl list-unit-files
Script for enable:

#!/bin/bash

for i in $*
do
    sudo systemctl enable $i
done

Call above script with passing multiple arguments or call below script with hardcoded services

#!/bin/bash

for i in eg_service_1 eg_service_2 eg_service_3
do
    sudo systemctl enable $i
done

Command enable/disable managed auto start of service on PC switch on or restart but for start/stop service must be used start/stop/restart command or you can check status using command status e.g.

systemctl status apache2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.