Connect to internet with minimal debian linux
The other day, I wanted to install Debian on my old machine. But past experiences have taught me, downloading the full iso image will be a wastage of bandwidth & space. So, I went for the net installer image. But here is the twist, I didn’t connect to the internet while installing. And hence, I ended up with a minimal system.
I didn’t have an ethernet cable, so I decided to use USB tethering from my phone. This minimal system hadn’t been configured to connect to use this network interface. So, here’s how I connected to the internet with minimal Debian installation.
List the available network interfaces:
ip link list
Then plug in your device and re-run the above command. You will see a new interface added to the list. Note the device id. As an example, let the device id be ens0.
Now edit
/etc/network/interfaces
Add the following to the file:
iface ens0 inet dhcp
Then as root, run the following:
ifdown ens0
ifup ens0
To check your connection, run ping on google
ping google.com
Now you are connected and ready to install what you want on the minimal Debian installation.