Skip to content

Instantly share code, notes, and snippets.

@v3rlly
Last active March 3, 2024 23:00
Show Gist options
  • Save v3rlly/268aab6fabb13768245e18e217c50109 to your computer and use it in GitHub Desktop.
Save v3rlly/268aab6fabb13768245e18e217c50109 to your computer and use it in GitHub Desktop.
Arch Linux network config - Virtualbox

Virtualbox info

mode: NAT
gateway: 10.0.2.2
network mask: 255.255.255.0
cidr: 10.0.2.0/24

Arch Linux info

interfaces:

  1. lo - state: unknown
  2. enp0s3 - state: down

Create static IP address

10.0.2.25 = the static IP address

ip address add 10.0.2.25/24 broadcast + dev enp0s3

Enable interface

ip link set enp0s3 up

Create route

10.0.2.2 = virtualbox default gateway

ip route add default via 10.0.2.2 dev enp0s3

test

ping -c4 8.8.8.8

Setup DNS

8.8.8.8 = Google's DNS

echo -e "nameserver\t8.8.8.8" >> /etc/resolv.conf

test

pacman -Syu

Setup network manager

pacman -S dhcpcd networkmanager

systemctl enable --now NetworkManager.service

shutdown -r now

test

curl -v -I https://www.google.com

Reference:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment