Automatic start of dhcpd service after booting up
I am using arch linux and every time I boot y system I have to manually run:
sudo dhcpcd enp0s31f6
sudo dhcpcd wlan0
to have internet connection. How Can I make start these services automaticly after boot ?
Thanks for help
EDIT:
Thanks for your answer. The solution was combination of enabling sudo systemctl enable dhcpcd.service and uninstalling Networkmanager which I did not know I had installed and was causing nondeterministic behavior of my device. Thanks to every one who was trying to help.
Edited 11 Dec 2020. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 0 · 50% up
- Kind
- Text
- ID
- katbck
14 comments
Deleted before we saved it.
sudo systemctl enable dhcpd4.service?
Afterr running this command I got:
Failed to enable unit: Unit file dhcpd4.service does not exist.but
sudo systemctl enable dhcpcd.servicedid:Created symlink /etc/systemd/system/multi-user.target.wants/dhcpcd.service → /usr/lib/systemd/system/dhcpcd.service.Still issue remains and after rebooting I still have to run these commands to be able to use internet.
Deleted before we saved it.
https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP
Maybe use systemd-networkd to manage your interfaces? rather easy to setup and already installed (if you have systemd which is rather likely)
If you set up and use Network Manager it has a built in dhcp server, as well as other helpful things.
Deleted before we saved it.
I found it very simple to set up and it's convenient since it does dhcp as well as resolving ip addresses. It could be overkill but after futzing around with the other bits and pieces it was nice to have an easy to use all-in-one solution.