How To Disable NetworkManager on Fedora 43

NetworkManager serves as Fedora 43’s default network configuration tool, automatically managing connections, Wi-Fi networks, and network interfaces. While this automation benefits desktop users, server administrators and advanced users often need more granular control over their network configuration. This comprehensive guide walks you through disabling NetworkManager on Fedora 43, implementing alternative network management solutions, and ensuring your system maintains reliable connectivity throughout the transition.
Whether you’re setting up a production server, installing cPanel, or simply prefer manual network control, understanding how to properly disable NetworkManager prevents connectivity issues and ensures smooth network operations.
Understanding NetworkManager in Fedora 43
What is NetworkManager?
NetworkManager is a dynamic network control and configuration daemon that handles network connections automatically. It detects available networks, manages wired and wireless connections, and provides seamless integration with desktop environments like GNOME, KDE, and XFCE. The service continuously monitors network devices, automatically switching between connections when needed.
For desktop and laptop users, NetworkManager simplifies connectivity. It handles VPN connections, automatically connects to known Wi-Fi networks, and manages network priorities without manual intervention. However, this automation becomes problematic in server environments where static configurations and predictable behavior are essential.
When to Disable NetworkManager
Server deployments require stable, unchanging network configurations. NetworkManager’s dynamic nature can interfere with static IP assignments, custom routing tables, and advanced networking setups. Additionally, certain enterprise software and control panels explicitly require NetworkManager to be disabled because they implement their own network management systems.
Consider disabling NetworkManager when running dedicated servers, implementing custom network bridges or bonds, configuring complex routing scenarios, or when third-party software conflicts with automatic network management. Remote servers particularly benefit from traditional network configuration methods that provide predictable, consistent behavior.
Prerequisites Before Disabling NetworkManager
Document your current network configuration before making changes. Record IP addresses, subnet masks, gateway addresses, and DNS server information. You’ll need these details to configure your alternative network management solution.
Ensure you have root or sudo access to your Fedora 43 system. If working on a remote server, maintain console or KVM access as a backup. Disabling NetworkManager without a replacement configuration will disconnect your system from the network. SSH sessions will drop if not properly prepared.
Prepare your alternative network management solution beforehand. Decide whether you’ll use systemd-networkd, the modern networking daemon, or legacy network scripts. Having configuration files ready prevents extended downtime during the transition.
Checking NetworkManager Status
Before disabling NetworkManager, verify it’s actually running and controlling your network interfaces.
Verify NetworkManager is Running
Open your terminal and execute:
systemctl status NetworkManager
The output displays the service status. Look for “active (running)” in green text, indicating NetworkManager is currently operational. The output also shows whether the service is enabled to start automatically at boot.
Check Which Interfaces NetworkManager Controls
List all network devices and their management status:
nmcli dev status
This command displays each network interface with its type, state, and connection name. Interfaces showing “connected” or “disconnected” are managed by NetworkManager. Interfaces marked “unmanaged” are ignored by NetworkManager and require alternative configuration methods.
View all configured connections:
nmcli connection show
This lists connection profiles NetworkManager uses to configure your interfaces. Note the connection names—you’ll need to recreate these configurations manually after disabling NetworkManager.
Method 1: Disable NetworkManager Using Systemctl
This method stops NetworkManager and prevents it from starting automatically at boot. It’s the standard approach for most server configurations.
Step 1: Stop the NetworkManager Service
Execute the following command to immediately stop NetworkManager:
sudo systemctl stop NetworkManager.service
This command halts NetworkManager without waiting for a reboot. Your current network connections will drop unless another network management service is already configured and running. On local systems, this momentary disconnection typically resolves quickly. On remote servers, ensure alternative network configuration is active first.
Step 2: Disable NetworkManager from Starting at Boot
Prevent NetworkManager from automatically starting during system boot:
sudo systemctl disable NetworkManager.service
This command removes the systemd symlinks that trigger NetworkManager at boot time. The service remains installed but won’t start automatically. You can still start it manually if needed for troubleshooting purposes.
The disable operation is reversible. If you later decide to re-enable NetworkManager, simply run the corresponding enable command.
Step 3: Verify NetworkManager is Disabled
Confirm the service is both stopped and disabled:
systemctl status NetworkManager
The output should display “inactive (dead)” and “disabled” indicators. For quick verification, use:
systemctl is-enabled NetworkManager
This returns “disabled” if successful. Your system now boots without NetworkManager attempting to manage network interfaces.
Method 2: Mask NetworkManager for Complete Prevention
Masking provides stronger prevention than simple disabling. It prevents NetworkManager from starting under any circumstances, even if another service or script attempts to start it.
Understanding Masking vs Disabling
Disabling removes boot-time triggers but allows manual starts or activation by other services. Masking creates a symbolic link from the service unit file to /dev/null, making the service completely unavailable. Systemd treats masked services as non-existent.
Use masking when software explicitly conflicts with NetworkManager or when you need absolute certainty that NetworkManager won’t interfere with your network configuration.
Steps to Mask NetworkManager
First, stop the running service:
sudo systemctl stop NetworkManager.service
Then apply the mask:
sudo systemctl mask NetworkManager.service
This creates an unbreakable link preventing NetworkManager activation. Verify with:
systemctl status NetworkManager
The status shows “masked” in the output, confirming complete deactivation.
How to Unmask If Needed Later
Should you need to restore NetworkManager functionality, unmask it first:
sudo systemctl unmask NetworkManager.service
Then enable and start the service normally. Masking is fully reversible, providing a safety net for testing alternative configurations.
Configuring Alternative Network Management
Disabling NetworkManager requires implementing an alternative method to manage your network interfaces. Fedora 43 supports both modern systemd-networkd and traditional network scripts.
Option 1: Using systemd-networkd
Systemd-networkd is the modern, lightweight network management solution integrated with systemd. It provides reliable configuration for servers and systems requiring static network setups.
Enabling systemd-networkd
Activate systemd-networkd with:
sudo systemctl enable systemd-networkd.service
sudo systemctl start systemd-networkd.service
These commands enable automatic startup at boot and immediately start the network management daemon.
Creating Network Configuration Files
Systemd-networkd uses configuration files stored in /etc/systemd/network/. Files are processed in lexicographical order, so naming conventions matter. Use numbering prefixes (10-, 20-, 30-) to control processing sequence.
Create a configuration file for your primary interface:
sudo nano /etc/systemd/network/10-static-eth0.network
Sample Static IP Configuration
For a static IP configuration, structure your file like this:
[Match]
Name=eth0
[Network]
Address=192.168.1.100/24
Gateway=192.168.1.1
DNS=8.8.8.8
DNS=8.8.4.4
Replace eth0 with your actual interface name (use ip link show to identify interfaces). Adjust IP addresses, subnet mask, gateway, and DNS servers to match your network environment.
For DHCP configuration, use:
[Match]
Name=eth0
[Network]
DHCP=yes
This automatically obtains IP configuration from your network’s DHCP server.
Enabling systemd-resolved for DNS
Systemd-resolved handles DNS resolution for systemd-networkd:
sudo systemctl enable systemd-resolved.service
sudo systemctl start systemd-resolved.service
Link the resolver configuration:
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
This symlink ensures applications use systemd-resolved for DNS queries.
Restart systemd-networkd to apply changes:
sudo systemctl restart systemd-networkd.service
Option 2: Legacy Network Scripts
Legacy network scripts offer compatibility with older configurations and tools. While less modern than systemd-networkd, they remain functional in Fedora 43.
Configuration File Location
Network interface configurations reside in /etc/sysconfig/network-scripts/. Each interface has a configuration file named ifcfg-<interface>, such as ifcfg-eth0 or ifcfg-enp0s3.
List existing configuration files:
ls /etc/sysconfig/network-scripts/ifcfg-*
Editing Network Interface Files
Edit your primary interface configuration:
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
Configure static IP settings:
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
DEFROUTE=yes
Set BOOTPROTO=dhcp for automatic IP configuration. The ONBOOT=yes parameter ensures the interface activates at boot time.
Enabling and Starting Network Service
If using legacy scripts without NetworkManager, ensure the network service is active:
sudo systemctl enable network.service
sudo systemctl start network.service
Note that modern Fedora versions prefer systemd-networkd over legacy network scripts.
Post-Disable Configuration Steps
After disabling NetworkManager and configuring an alternative, several additional steps ensure full functionality.
Configuring DNS Resolution
If not using systemd-resolved, manually configure DNS in /etc/resolv.conf:
sudo nano /etc/resolv.conf
Add nameserver entries:
nameserver 8.8.8.8
nameserver 8.8.4.4
Prevent automatic overwrites by making the file immutable:
sudo chattr +i /etc/resolv.conf
Remove immutability with chattr -i when updates are needed.
Setting Up Static Routes
Complex network topologies may require custom routing entries. Add temporary routes with:
sudo ip route add 10.0.0.0/8 via 192.168.1.254
For persistent routes with systemd-networkd, add to your .network file:
[Route]
Destination=10.0.0.0/8
Gateway=192.168.1.254
Testing Network Connectivity
Verify connectivity thoroughly after configuration changes. Test gateway reachability:
ping -c 4 192.168.1.1
Test external connectivity:
ping -c 4 8.8.8.8
Verify DNS resolution:
nslookup google.com
Check routing tables:
ip route show
All tests should succeed before considering the migration complete.
Troubleshooting Common Issues
Even careful configuration sometimes encounters problems. These troubleshooting steps resolve common issues.
Network Connection Lost After Disabling
Complete connectivity loss typically indicates misconfigured interface settings. First, verify your interface is up:
ip link show
If the interface shows “DOWN”, activate it:
sudo ip link set eth0 up
Check for configuration file syntax errors in systemd-networkd files or legacy interface scripts. Typos in IP addresses, incorrect subnet masks, or wrong gateway addresses prevent connectivity.
Review system logs for network-related errors:
sudo journalctl -u systemd-networkd -n 50
This displays the last 50 log entries for systemd-networkd, revealing configuration problems.
DNS Resolution Failures
DNS problems manifest as inability to reach websites by name while IP addresses work. Verify /etc/resolv.conf contains valid nameserver entries:
cat /etc/resolv.conf
If empty or incorrect, add working DNS servers. Check systemd-resolved status:
systemctl status systemd-resolved
Ensure it’s active and running. Test DNS directly:
dig google.com @8.8.8.8
This bypasses local configuration, confirming external DNS servers are reachable.
Service Conflicts
Multiple network management services create conflicts. List running network-related services:
systemctl list-units --type=service --state=running | grep network
Only one network management system should run simultaneously. If both systemd-networkd and legacy network services are active, disable one:
sudo systemctl stop network.service
sudo systemctl disable network.service
Clear conflicts ensure predictable network behavior.
SSH Connection Issues on Remote Servers
Remote server configuration requires extreme caution. Always maintain console or KVM access before modifying network settings. If SSH disconnects, use console access to review and correct configurations.
Prepare configuration files completely before disabling NetworkManager. Test configurations on non-critical systems first. Consider using screen or tmux sessions that persist across SSH disconnections.
Verifying the Changes
Complete verification ensures your configuration works correctly and persists across reboots.
Create a comprehensive checklist: NetworkManager stopped and disabled, alternative network management active and enabled, connectivity to gateway and external hosts working, DNS resolution functioning correctly, and routing tables configured properly.
Confirm NetworkManager isn’t running in the background:
ps aux | grep NetworkManager
Only your grep command should appear in results. Test configuration persistence by rebooting:
sudo reboot
After reboot, verify all network functionality returns automatically without manual intervention. This confirms your configuration survives system restarts.
When to Re-enable NetworkManager
Some scenarios warrant restoring NetworkManager. Desktop environment installations benefit from NetworkManager’s automatic connection handling and GUI integration. Laptop systems moving between networks need NetworkManager’s dynamic capabilities.
Re-enable NetworkManager by reversing the disable process:
sudo systemctl unmask NetworkManager.service
sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service
Before re-enabling NetworkManager, disable conflicting services:
sudo systemctl stop systemd-networkd.service
sudo systemctl disable systemd-networkd.service
This prevents management conflicts. Test connectivity after re-enabling to ensure NetworkManager properly detects and configures your interfaces.
Best Practices and Recommendations
Success requires methodical planning and execution. Document every aspect of your current network configuration before making changes. Write down IP addresses, routes, DNS servers, and any custom network settings.
Keep backups of all configuration files. Copy /etc/sysconfig/network-scripts/ or /etc/systemd/network/ directories to safe locations. These backups enable quick recovery if problems arise.
Test network configuration changes in non-production environments first. Virtual machines or test servers provide safe spaces for experimentation without risking critical systems.
Modern Fedora deployments benefit from systemd-networkd over legacy network scripts. Systemd-networkd integrates seamlessly with other systemd components, providing consistent management and logging.
Consider your actual network management needs. Desktop users rarely benefit from disabling NetworkManager. Server administrators typically prefer static configuration tools. Match your configuration method to your use case.
Monitor network service status regularly:
systemctl status systemd-networkd.service
Regular monitoring catches problems early. Keep your Fedora 43 system updated with security patches and bug fixes that improve network stack stability.
Understanding the difference between disable and mask operations helps choose the appropriate method. Use disable for normal situations; reserve masking for absolute prevention requirements.
When configuring remote servers, maintain SSH access throughout the transition. Configure new network management completely before disabling NetworkManager. Test extensively before disconnecting console access.
Congratulations! You have successfully disabled NetworkManager. Thanks for using this tutorial to disable NetworkManager on your Fedora 43 Linux system. For additional or useful information, we recommend you check the official Fedora website.