I manage to connect to the internet using only the terminal. I created a hot-spot using my phone without password. It is important to be without a password, because connecting to the terminal allows only WEP secured passwords, but my phone supported only WPA2 protected passwords.
sudo ip addr flush dev wlp3s0
It is not a necessary step, but it will clean if there is any other connection already
sudo ifconfig wlp3s0 down
Switched off the adaptor
sudo ifconfig wlp3s0 up
Switches on the adaptor
sudo ifconfig wlp3s0 essid [name of wifi network]
sudo dhclient wlp3s0
Connects you to the wifi network from step 4
Where wlp3s0
is the name of your adaptor. You can find out what is the name of your adaptor using ifconfig -a
You can check if you have internet using ping google.com
And finally i want to say that i do not had internet because my hard disk /dev/mapper/ubuntu--vg-root
was full with data and the whole system was not working currently. So you can check that was well. My problem was that /var/log/
was full with data and I just deleted the whole log folder using 'rm -rf /var/log/` IT IS STRONGLY RECOMMENDED NOT TO DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING!!! IT IS ALWAYS A LAST CHOICE TO JUST DELETE THE WHOLE 'LOG' FOLDER JUST LIKE THAT! If you do this you will end up with a lot of problems and recreating the log folders of debs that need them for example: apache2, nginx, mysql... and so on. You have to create them after that manually and also deal with all the right rights for the folders and the files. So, be careful. It is recommended only to delete the deb of the log folder and then delete the log folder. I did that, because it was filling with data all the time and i had no other choice. Hope i helped.
BTW, you can check if your driver is installed running sudo lshw -C network
and there should be this info
*-network
description: Wireless interface
product: QCA9565 / AR9565 Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
logical name: wlp3s0
version: 01
serial: 74:c6:3b:d5:45:6f
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=4.13.0-38-generic firmware=N/A ip=192.168.100.7 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:19 memory:9b100000-9b17ffff memory:9b180000-9b18ffff
driver=ath9k driverversion=4.13.0-38-generic
rfkill list all
– chili555 Apr 03 '18 at 13:38/dev/mapper/ubuntu--vg-root
was full and that was i think the reason why i didnt had internet. it took me like 8 hours to find that out. – Dimitar Apr 03 '18 at 18:26sudo ip addr flush dev wlp3s0
,sudo ifconfig wlp3s0 down
,sudo ifconfig wlp3s0 up
,sudo ifconfig wlp3s0 essid [name of wifi network]
(i created a new hot-spot with my phone without password,sudo dhclient wlp3s0
, wherewlp3s0
is the name of the wifi adapter you can get this name fromifconfig -a
– Dimitar Apr 03 '18 at 18:46