You are not logged in.

#1 2017-02-17 16:14:53

billythekidd
Member
Registered: 2017-02-17
Posts: 2

[SOLVED] run command after every boot to make ethernet working

Hi, every time I boot my pc on arch, I have to manually enter dhcpcd + the interface name in order to make the ethernet working.
It becomes annoying after a while... is there a way to fix it?
Here is the output on the terminal.

[gui@localhost ~]$ sudo dhcpcd enp2s0
[sudo] password for gui:
enp2s0: waiting for carrier
enp2s0: carrier acquired
DUID 00:01:00:01:20:2a:34:b2:68:f7:28:88:d2:cf
enp2s0: IAID 28:88:d2:cf
enp2s0: adding address fe80::7c11:f166:e00b:479d
enp2s0: soliciting a DHCP lease
enp2s0: offered 192.168.0.192 from 192.168.0.1
enp2s0: probing address 192.168.0.192/24
enp2s0: soliciting an IPv6 router
enp2s0: Router Advertisement from fe80::5667:51ff:fe29:2437
enp2s0: adding address 2a02:1811:417:b100:ee74:d230:aa42:699d/64
enp2s0: adding route to 2a02:1811:417:b100::/64
enp2s0: adding default route via fe80::5667:51ff:fe29:2437
enp2s0: requesting DHCPv6 information
forked to background, child pid 1268

Last edited by billythekidd (2017-02-18 13:52:51)

Offline

#2 2017-02-17 16:30:02

positronik
Member
Registered: 2016-02-08
Posts: 94

Re: [SOLVED] run command after every boot to make ethernet working

Why don't you start it via its systemd .service?

Offline

#3 2017-02-17 16:36:24

jean_no
Member
Registered: 2007-09-18
Posts: 48

Re: [SOLVED] run command after every boot to make ethernet working

Offline

#4 2017-02-17 17:18:07

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: [SOLVED] run command after every boot to make ethernet working

You appear to have missed at least these two steps from the installation guide
Installation_guide#Hostname
Installation_guide#Network_configuration

Offline

#5 2017-02-17 19:53:44

adergaard
Member
Registered: 2016-07-27
Posts: 14

Re: [SOLVED] run command after every boot to make ethernet working

Just a heads up.

Before you go 'systemctl enable dhcpcd.service' or 'systemctl enable dhcpcd@enp2s0.service' think about whether or not you are going to use a DE.
If you are using a DE, go for the NetworkManager approach and do _NOT_ enable the dhcpcd service since it will slow down your boot something fierce unless you tweak it manually afterwards, and even if you do, NetworkManager is really more pleasant to use in a DE anyways.

I'm sure there will be questions like "What?? I have dhcpcd service enabled and my boot time is 2 seconds". Then, all I can say is "good for you". The rest of the world often get this 1.5 minute long hanging thing that stems from a bug as I understand it but can be manually removed, but it was kind of a hard time finding the file to remove to make it go away, so avoiding it altogether is best, in my view.

Offline

#6 2017-02-18 13:52:19

billythekidd
Member
Registered: 2017-02-17
Posts: 2

Re: [SOLVED] run command after every boot to make ethernet working

Thank you for your fast answers.
I followed adergaard's advice and know everything works fine thanks to the network manager and your advice.
I used this excellent video https://www.youtube.com/watch?v=MAi9DurTRQc to guide me along the process.

Offline

#7 2017-02-18 14:36:55

Daerandin
Member
From: Norway
Registered: 2013-05-07
Posts: 258
Website

Re: [SOLVED] run command after every boot to make ethernet working

Using youtube videos is strongly discouraged as they are often incorrect. Even in the rare cases where they are correct, they will quickly become outdated and useless. The Arch wiki, along with official documentation for your chosen software, should always be your information resource when running Arch Linux.

Offline

Board footer

Powered by FluxBB