How to Make Network Manager Start Automatically
Network Manager is an essential service in many Linux distributions that allows you to manage network connections easily. Sometimes, you might encounter an issue where Network Manager doesn’t start automatically at boot. One common reason for this issue is misconfigurations in the Network Manager service file.
In this article, we’ll guide you on how to ensure Network Manager starts automatically at boot by removing the static-network-up
line from the Network Manager service configuration file.
Prerequisites
Before proceeding, make sure you have:
- Administrative (sudo) privileges on your Linux system.
- A text editor installed. You can use any text editor of your choice, such as Nano or Vim.
Steps to Remove the static-network-up
Line
Follow these steps to remove the static-network-up
line from the Network Manager service configuration file:
-
Open a terminal window. You can usually access the terminal by pressing
Ctrl + Alt + T
or searching for “Terminal” in your system’s application menu. -
Gain administrative privileges by running the following command:
1
sudo su
-
Navigate to the Network Manager service configuration directory by entering:
1
cd /etc/init/
-
Use a text editor to open the
network-manager.conf
file. You can use any text editor you prefer; here, we’ll use Nano:1
nano network-manager.conf
-
Locate the
start on
line in the configuration file. It should look like this:1
start on (local-filesystems and static-network-up)
-
Remove the
static-network-up
condition, so the line now looks like this:1
start on (local-filesystems)
-
Save your changes by pressing
Ctrl + O
, then press Enter. To exit Nano, pressCtrl + X
. -
Restart the Network Manager service to apply the changes:
1
systemctl restart NetworkManager
Network Manager should now start automatically at boot without the static-network-up
condition.
Conclusion
In this guide, we’ve shown you how to remove the static-network-up
line from the Network Manager service configuration file to ensure that Network Manager starts automatically at boot. This can be especially useful if you’ve encountered issues with Network Manager not starting as expected on your Linux system.