0

I connected my Pi Zero to my PC ( Linux LMDE 3 Cindy) via USB port successfully, SO i want to connect to internet via my laptop which is connected to internet by its WIFI.

I found this instruction or this question via raspberrypi.stackexchange but those are working for window or MAC OS,but i don't find it for Linux!!!!

SO i need the similar instruction for enabling sharing my internet via USB enp0s20f0u1 device (PI Zero) in Linux. for example in windows we need to :

In the WiFi Properties window, click on the “Sharing” tab : similar to this photo:

WiFi internet sharing

So in Linux version what is the similar instruction to doing this?

Thanks a lot.

  • Your question seems to be about sharing an Internet connection in as desktop Linux. To what it is shared, the Pi, is irrelevant in this context. – GabrielaGarcia May 20 at 22:00
  • I want to share my laptop internet to my raspberry which is connected to my laptop via USB Port. I found the way's for windows OS but not for Linux OS. SO i asked here. – modern May 21 at 4:46
  • 1
    Thank you for clarifying. The Raspberry Pi is NOT the issue then, it's irrelevant, as I previously commented. For general Linux questions there's Unix & Linux (make sure to post all the relevant information about your distro and version). Your question is about sharing an Internet connection in a desktop Linux. To what it's shared DOESN'T MATTER. The Raspberry Pi needs no special configuration for that, there's nothing RPi specific in using a shared internet connection. – GabrielaGarcia May 21 at 5:30
  • This is exactly the same situation as commented in raspberrypi.stackexchange.com/questions/11684/… , replace Windows by Linux and it's exactly the same situation. – GabrielaGarcia May 21 at 5:52
0

here you could find good suggestion here :

as it said on page 16 add this to /etc/network/interfaces ( by sudo nano /etc/network/interfaces):

allow-hotplug wlan1
iface wlan1 inet manual
   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug usb0
iface usb0 inet static
        address 192.168.7.2
        netmask 255.255.255.0
        network 192.168.7.0
        broadcast 192.168.7.255
        gateway 192.168.7.1

After that Save the file and run

sudo ifdown usb0 

(this may fail, its fine)

sudo ifup usb0
ifconfig usb0

unplug pi and then connect it to usb again .it'll probably be set up for DHCP by default so change it to Configure IP4 Manually:

For the IP address pick 192.168.7.1 (note that this is not the same

as the Pi Zero's address!) For the subnet mask, use 255.255.255.0

(same as Pi) For the router/gateway use 192.168.7.1 (same as Pi)

If you didn't use our suggested netconfig above on the Pi, you may have to adjust this one to Linux similar to this: enter image description here

and then you could run sudo ssh pi@192.168.7.2 to connect to that, second part is could be done easier and you must configure your mode, to share internet with this IP (192.168.7.2) and i will write tomorrow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.