No internet after fresh installed ArchLinux [SOLVED]

Hello folks o/

Today i made a fresh install on Arch using VM. Everything went smooth with the installation process, even with some slight problems with the partitions i ended up figuring it out. After the reboot i logged in and wanted to

pacman -S xorg xorg-xinit

And here’s what i got

Failed retrieving file ‘x’ could not resolve host ‘x’

Decided to run a quick ping and turned out i had no internet connection at all.

Tried to reset the network manager service and once again the service wasn’t found. Any help will be appreciated.

Kind Regards

Can you give us the output of ifconfig, ip, nslookup google.com, cat /etc/resolv.conf ?

Hey, yes sure.
ifconfig - returns 2 interfaces, lo and enp0s3.

lo: <LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether

As for the nslookup, the command wasn’t found, i feel like net-tools package doesn’t even exist, and that being said i cannot install it.

Resolv.conf looks like empty file just 2 lines
Resolver configuration file.
See resolv.conf(5) for details.

Yeah, arch doesn’t automatically start scanning for wireless networks like some other nix distributions do. If you don’t have a GUI (usually arch doesn’t have one by default), you’ll have to use wpa_supplicant. Here’s the guide I’ve always used: https://wiki.archlinux.org/index.php/WPA_supplicant. You pretty much just fill in the details of your wireless network in /etc/wpa_supplicant/wpa_supplicant.conf.

1 Like

Is the ethernet cable connected?

Hey, yes it is. I think the problem is that the host file as well as resolv one is just empty

Strongly doubt if it’s the same thing but was installing CentOS 8 today with virtualbox and the top answer here worked https://superuser.com/questions/915536/centos-7-virtualbox-no-internet-access.

1 Like

I will try later on, thank you for pointing it out. I also agree it could be the fact that resolv.conf is actually empty, like i don’t have any nameservers set.

Quick update, tried what Silence adviced but no results so far. Damn I’m probably missing something but can’t understand what

Maybe you didn’t enable service dhcpcd?

If you did followed arch linux’s installation guide, after you did everything, there is no command for this:
systemctl enable dhcpcd

This should fix your problem.

Repositories:
https://www.youtube.com/watch?v=HpskN_jKyhc ( 32:55 is where is that command )
https://wiki.archlinux.org/index.php/Installation_guide

I hope this helps. Also you should do everything that is said in that youtube video. It is very helpful one.

Best regards.

1 Like

Hello man, I’ve already tried that, the thing is that as i mentioned dhcpcd doesn’t even exist along with other services. I forgot to say that I’ve just fixed the issue with the following procedure.

  1. nano /etc/systemd/network/enp0s3.network
  2. [Match]name=en*[Network]DHCP=yes
  3. Saved the file
  4. systemctl restart systemd-networkd
  5. systemctl enable systemd-networkd
  6. Did a quick reboot and issue was solved.
1 Like