On my Ubuntu 14.04.2 LTS network-manager isn't installed yet. Without this program I can't connect to WiFi network. But I can't install this package from Ubuntu without network connection. Here is my question. How to install this offline? or How to install from another computer?
1 Answers
You can connect to WiFi without network-manager (even though it should have been installed by default). Open a terminal and run:
sudo iwconfig
There will be some output like lo, eth0, wlan0. The one we want is wlan. Take note of its name (probably wlan0).
sudo nano /etc/network/interfaces
Go to the end of the file and create a new line. Write the following:
auto wlan0
Replacing wlan0 with what you found back there. In new lines:
iface wlan0 inet dhcp
wpa-ssid SSID
Replacing SSID with the name of your WiFi connection.
wpa-psk password
Replacing password with your WiFi network's password.
Hit Ctrl+O then Enter to save and Ctrl+X to exit. In the terminal, run:
sudo ifup wlan0
And you should be connected. You can now install network-manager and anything you want. Remember to remove everything you wrote from /etc/network/interfaces before using network-manager otherwise it won't work.
- 5,757
- 3
- 18
- 32
-
A `sudo iwconfig` command doesn't works. Command not found. – R.D.O Jan 22 '16 at 14:22
-
You did something wrong. Try `sudo ifconfig` instead. – Eduardo Cola Jan 22 '16 at 14:51
-
Command workd, but not internet. My `/etc/network/interface/` looks like this (without #): `auto lo` (new line) `iface lo inet loopback` (3 lines down) `allow-hotplug eth0` (new line) `iface eth0 inet dhcp` (new line) `auto wlan0` (new line) `iface wlan0 inet dhcp` (new line) `wpa-ssid` (ssid) (new line) `wpa-psk` (password). And information for `sudo ifconfig` is: eth0, lo. I don't know what I have to do. – R.D.O Jan 24 '16 at 18:14
-
If ifconfig shows only lo and eth0, your Wireless driver is not working/doesn't exist. Could you run `dmesg | grep Network` and give me the output? – Eduardo Cola Jan 24 '16 at 18:31
-
Also try `dmesg | grep Wireless`. – Eduardo Cola Jan 24 '16 at 18:32
-
My `ifconfig` show wlan0. – R.D.O Jan 24 '16 at 18:43
-
But.. You just said it doesn't! OK, could you remove everything you added to /etc/network/interfaces and reinstall network-manager? You know, that should work out of the box. – Eduardo Cola Jan 24 '16 at 18:47
-
My `ifconfig` show wlan0. `dmesg` command show a lot of text. – R.D.O Jan 24 '16 at 18:47
-
I don't have network-manager (ubuntu said that). – R.D.O Jan 24 '16 at 18:49
-
How to shutdown system with command? – R.D.O Jan 24 '16 at 18:51
-
I can't do some actions, beacuse it's only Raspberry Pi. – R.D.O Jan 24 '16 at 19:05
-
You definitely should have said that in your question. Shutdown=`sudo shutdown -h now` – Eduardo Cola Jan 24 '16 at 20:57