Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As a learning experiment, I'm trying to turn Ubuntu Desktop into a server. I was able to disable X at boot time and now, I am trying to get my computer to connect to my WiFi network at boot time, before any user logs in. That way, I won't have to be physically near my computer every time it reboots. I've set up the WiFi connection using the Network Manager if that can help somehow (would be nice not having to reconfigure it again!).

share|improve this question

I found out how to do it :) Simply go in Network Manager / Edit Connection. Select your connection, click Edit and check "Available to all users".

You may also need to add a line for each interface that you want to automatically come up at boot time in /etc/network/interfaces:

auto eth0
auto wifi0
share|improve this answer
    
Is that working?I have already tried that but it's not working. – karthick87 Dec 6 '10 at 4:12
    
Yep it's working here. The connection doesn't use DHCP but I doubt it wouldn't work because of DHCP. – Olivier Lalonde Dec 6 '10 at 4:17
    
The interface cards won't always be named "eth0" and "wifi0". You can find the names of the ethernet interfaces with "cat /proc/net/dev " or "ifconfig". – Jonathan Dec 11 '15 at 11:05
    
is doesn't work on my fresh install of Ubuntu 16.04. The network connection is made only after a user logs in. This makes working remote extremely difficult. – L. D. James Jun 15 at 9:54

For all people who is using Ubuntu 16. You should go to /etc/NetworkManager/system-connections/ Where you'll see the file which contains your internet settings. Edit it, find the line with permission and delete all after = Restart and you can connect before login

share|improve this answer

Edit the interfaces file /etc/network/interfaces

sudo gedit /etc/network/interfaces

Add the following,

auto ra0
iface ra0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

share|improve this answer
    
Is there a technical difference between the way I did it (see my answer) and yours? – Olivier Lalonde Dec 6 '10 at 4:07
    
Olivier, I think your solution is more up-to-date, depending as it does on a relatively new feature of NetworkManager. Kathick's solution, on the other hand, circumvents NetworkManager altogether. Your solution might be more robust as NetworkManager keeps track of the connection and reconncects if it is lost temporarily (although the interfaces way might do that too in some cases). – loevborg Dec 6 '10 at 15:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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