Cannot connect to wired connection on Ubuntu (SOLVED)

When your Wireless interface is working and the ethernet isn’t working on Ubuntu, here’s a quick howto to check and fix a misconfiguration. It doesn’t solve any ethernet issues but you can give a try and on an Asus laptop (with JMicron chipset) I worked on it makes the job done.

Tested on Ubuntu 16.04 LTS

First steps

To detect Ethernet interface:


To check and configure connection:

apt-get install ethtool

To save the current status of network interface:

ethtool ens5f5 > ethernet_before.txt

Make ethernet interface works

ethtool -s ens5f5 speed 1000 duplex full autoneg on


ethtool -s ens5f5 speed 100 duplex full autoneg on

Then to check what is the difference between the old non-working configuration and the configuration that works:

ethtool ens5f5 > ethernet_after.txt
diff ethernet_before.txt ethernet_after.txt

If it doesn’t work try other ways, e.g. looking for specific issue on your Ethernet driver:

lspci | grep Ethernet


lspci | grep ethernet

to check your driver.

If the issue reappears after reboot, to make the command to run on startup do:

sudo bash
crontab -e

And add:

@reboot /sbin/ethtool -s ens5f5 speed 100 duplex full autoneg on

Now reboot to check if changes takes effect

How to import .ovpn files on Ubuntu Linux network manager

On Linux you don’t need to install OpenVPN because it’s already installed. However, configuration especially via the network manager can be tricky.

Install this additional package on your distro to display a new OpenVPN option in the network manager:

sudo apt-get install network-manager-openvpn-gnome

If you’re migrating from Windows and you’ve already a Windows installation of OpenVPN you can copy .key, .crt, .conf and .ovpn files from the OpenVPN location. Copy these files to your Linux home (e.g. ~/openvpn/) and reshape permissions to allow the access only to the owner.

After you’ve the .ovpn, .crt, .key files locally, you can test the connection using these commands:

cd ~/openvpn/;
sudo openvpn my-openvpn-file.ovpn

Type the sudo password, wait and the connection should be established successfully. Press Ctrl+C to stop the VPN from command line.

Now you can configure the Network Manager to accept the .ovpn file.

Click on the network icon on the top right corner of the screen, click current connection, select settings and look for VPN Settings from the opened window.

Click the + icon aside the VPN title and select Import from file…

Select the my-openvpn-file.ovpn you’ve checked before. A form containing user certificate, CA, private key and the gateway will be automatically filled. Input the password in the last field when needed.

It’s very important to select .ovpn and not .conf since the latter will not work.

If the private key is password protected you can also type the password and on Advanced you can do some fine tuning but it’s usually unnecessary.

(Only for Ubuntu < 20) On the Details tab, uncheck the automatic connection option if you don’t want to start the VPN at every login.

You can also choose if you want to allow other users to access the connection after save.

On IPv4 and IPv6 you can disable a specific protocol or limit the connection to “Use this connection only for resources on its network“. This last step is particularly important because using VPN can limit network connection.

Press Apply and you should be able to connect pressing the network icon on the top right corner > VPN > your VPN name.

To list saved connections:

 nmcli c 

Programmatically connect / disconnect to VPN

If you need to write a script to use this imported connection, you can use openvpn command but you have to set all the parameters manually.

To reuse the saved connection instead, you can simply use nmcli to connect:

 nmcli con up id my-connection-name 

And disconnect:

 nmcli con down id my-connection-name 


Tested on Ubuntu 20, 18 and 17.


Make Flash works with Chrome on Ubuntu 64 bit

  1. Download Chrome for Linux (64 bit .deb package)
  2. Install the package
  3. On shell type:
    $ sudo bash
    If you don’t have wget installed:
    # apt-get install wget
    # cd /opt/google/chrome/
    # mkdir plugins
  4. Get the latest experimental Flash Player “Square” on
    and then put it on Chrome plugins folder e.g.

  5. Close and restart Chrome: now Flash 10 is working.

See also:

Reinstalling Windows keeping GNU/Linux partition safe

Tested with:

  • Windows Vista
  • Ubuntu 9
  • (on the same disk, different partitions)

Today I’ve to reinstall Windows. I’ve already an installation of GNU/Linux (Ubuntu) on the same disk. I have to worry? In the past, I had to say a big YES. And since I do a Windows reinstall every 2-3 years, this carry back something from previous times.

(Please skip this paragraph.)

When I was a little boy, the best processor I was dreaming was Pentium 133Mhz, PCs were assembled in my country and my days was filled with Duke Nukem 3d and Lucas Arts adventures, well in that days I had a freaking fear to lose all my precious savegames and BASIC experiments due to a disaster. I discovered a real MBR disaster several years later, with Mandrake and Windows 98.

Well, now things are easier.

  1. Backup your files from Windows (Lucas Arts adventures savegames too…).
  2. Reinstall that crappy OS that you had to have to play some games to the partition that it deserves.
  3. After the operation Your Master Boot Record is gone, GRUB is gone. Linux, where are you??
  4. Download Super Grub2 Disk.
  5. Take an old CD-RW (that one with the photos of your sister kitten that she loves so much), erase it and burn the bootable iso on it.
  6. Now follow the instruction from the website. I’ve followed these steps:
  7. Select Detect any OS. On the next window, select your GNU/Linux distribution, identified by the kernel version (the more recent version is usually the right).
  8. Now that your distro is successfully running (i.e. Ubuntu), you have to rebuild the Grub bootloader, putting it on the MBR of the disk.
  9. Open a shell and type:
    sudo -i
    grub-install /dev/sda
    Where /dev/sda is the device for the disk where the two OS are. If you have doubt, use tools like gparted to inspect your disk searching for the right device identifier.
  10. After restart, Grub is running again! So Windows is reinstalled without even touching Ubuntu.

If you’re also interested on changing grub boot sequence order, follow this howto.