When the network.service job fails with the error code, it means that the control process for the network service has exited with an error. This usually happens when the network service is not able to start or stops unexpectedly.
- Check the status of the network.service using the command: systemctl status network.service
- Try to restart the network.service using the command: systemctl restart network.service
- Try to reload the network.service using the command: systemctl reload network.service
- Check the journal for network.service using the command: journalctl -u network.service
- Try to enable the network.service using the command: systemctl enable network.service
1. Check the status of the network.service using the command: systemctl status network.service
The command to check the status of the network.service is: systemctl status network.service The output of this command will show the status of the network.service and any errors that have occurred. The first line of the output will show the name of the service, which in this case is network.service. The next line will show the status of the service, which in this case is currently running. The last line of the output will show any errors that have occurred.
2. Try to restart the network.service using the command: systemctl restart network.service
Execute the following command to restart the network service: systemctl restart network.service If the command is successful, then the network service has been restarted.
3. Try to reload the network.service using the command: systemctl reload network.service
The steps to reload the network.service using the command: systemctl reload network.service are as follows:
- Execute the command: systemctl reload network.service
- If the command is successful, the network.service has been reloaded.
4. Check the journal for network.service using the command: journalctl -u network.service
The journalctl command can be used to check the status of the network.service process. The following command will show the current status of the network.service process: journalctl -u network.service The command output will show the error code that was returned when the control process exited. In this case, the error code is set to 2, which indicates that the network.service process failed because the control process exited with error code.
5. Try to enable the network.service using the command: systemctl enable network.service
To enable the network.service using the command: systemctl enable network.service
- Use the systemctl command to view the status of the network.service.
- If the network.service is not enabled, use the enable command to enable the network.service.
- Use the service command to restart the network.service.
Some users might also have success with the following opitons:
- Try to disable the network.service using the command: systemctl disable network.service