Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
sudo nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
other details:
OS: Linux Peppermint 7
My computer does not have any WiFi adapter attached, so basically I connect my system through USB tethering from my phone. Now I want to use Ethernet connection.
Router working fine as I connected this ethernet cable with another windows machine, network working fine. In my linux system only its not connecting, ant fix would be helpful.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by bmohanraj91
Router working fine as I connected this ethernet cable with another windows machine, network working fine. In my linux system only its not connecting, ant fix would be helpful.
Are you plugging in both your ethernet cables to your router and Linux machine?
Edit:
If you are, this could cause problems.
Last edited by jsbjsb001; 10-04-2017 at 04:24 AM.
Reason: added comment
There's many aspects to having a connection. The physical part you've covered with the cable (assuming that it's plugged in). The driver for the ethernet device likely exists and works under linux. Then you need an IP assigned and a ROUTE. DHCP can do most of this for you. Along with DNS entries to translate names to IPs (the /etc/resolv.conf file), also filled out with DHCP.
# dhclient -4 -v enp4s0f2
# ping -c 2 8.8.8.8
# ping -c 2 google.com
$ ip addr show
$ ip link show
$ ip route show
# netstat -r
# route -n
And various other ways, some deprecated, to get the deets on your setup. But throw in virtualization and docker and the methods get "different".
Your initial output states two ethernet interfaces. (being enp0s26u1u2 and enp4s0f2)
Are you sure your PC has only one ethernet card?
Can you post the model and brand of your PC?
Acer Aspire E1 series, but dont know the model name, the sticker has faded out.
I basically use USB tethering for internet connection as my laptop dont have WiFi adapter. Was it because of that another ethernet interface shows.
The -r flag explicitly releases the current lease, and once the lease has been released, the client exits. For example, open terminal and type the command:
$ sudo dhclient -r
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.