Automatically connect Ubuntu to a specific WiFi at startup

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












I am working with Ubuntu 16.04. I want the system to connect to a particular WiFi network automatically when it boots; it can be a new connection which the system has not connected to earlier.
For example: SSID = wireless; password = abcde



I have tried suggestions from this question but they did not work for me (the system kept connecting to one of the previously known networks).



Please help. Thanks.










share|improve this question

























    up vote
    2
    down vote

    favorite












    I am working with Ubuntu 16.04. I want the system to connect to a particular WiFi network automatically when it boots; it can be a new connection which the system has not connected to earlier.
    For example: SSID = wireless; password = abcde



    I have tried suggestions from this question but they did not work for me (the system kept connecting to one of the previously known networks).



    Please help. Thanks.










    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I am working with Ubuntu 16.04. I want the system to connect to a particular WiFi network automatically when it boots; it can be a new connection which the system has not connected to earlier.
      For example: SSID = wireless; password = abcde



      I have tried suggestions from this question but they did not work for me (the system kept connecting to one of the previously known networks).



      Please help. Thanks.










      share|improve this question













      I am working with Ubuntu 16.04. I want the system to connect to a particular WiFi network automatically when it boots; it can be a new connection which the system has not connected to earlier.
      For example: SSID = wireless; password = abcde



      I have tried suggestions from this question but they did not work for me (the system kept connecting to one of the previously known networks).



      Please help. Thanks.







      networking wireless






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 16 at 15:03









      Rahul Bohare

      266




      266




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You can edit the interface file /etc/network/interfaces and add the informations about the WiFi you want to connect to :



          network=
          ssid="testing"
          psk="testingPassword"






          share|improve this answer






















          • Also, just to make sure, the ssid and psk are written without the " ", right?
            – Rahul Bohare
            Feb 16 at 15:20










          • Mmhh, It works with them , but maibe they are not mandatory
            – Félicien
            Feb 16 at 15:21










          • Tried with and then without quotes, it's still connecting to the previously known network, and not the one specified in interfaces file.
            – Rahul Bohare
            Feb 16 at 15:29










          • It might have something to do with wifi priority, you could try to 'forget' the known wifi in order to be sure that the added network connection works and, if yes, you can try to change the priority with one of these methods :askubuntu.com/questions/165679/…
            – Félicien
            Feb 16 at 15:42










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006818%2fautomatically-connect-ubuntu-to-a-specific-wifi-at-startup%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          You can edit the interface file /etc/network/interfaces and add the informations about the WiFi you want to connect to :



          network=
          ssid="testing"
          psk="testingPassword"






          share|improve this answer






















          • Also, just to make sure, the ssid and psk are written without the " ", right?
            – Rahul Bohare
            Feb 16 at 15:20










          • Mmhh, It works with them , but maibe they are not mandatory
            – Félicien
            Feb 16 at 15:21










          • Tried with and then without quotes, it's still connecting to the previously known network, and not the one specified in interfaces file.
            – Rahul Bohare
            Feb 16 at 15:29










          • It might have something to do with wifi priority, you could try to 'forget' the known wifi in order to be sure that the added network connection works and, if yes, you can try to change the priority with one of these methods :askubuntu.com/questions/165679/…
            – Félicien
            Feb 16 at 15:42














          up vote
          0
          down vote













          You can edit the interface file /etc/network/interfaces and add the informations about the WiFi you want to connect to :



          network=
          ssid="testing"
          psk="testingPassword"






          share|improve this answer






















          • Also, just to make sure, the ssid and psk are written without the " ", right?
            – Rahul Bohare
            Feb 16 at 15:20










          • Mmhh, It works with them , but maibe they are not mandatory
            – Félicien
            Feb 16 at 15:21










          • Tried with and then without quotes, it's still connecting to the previously known network, and not the one specified in interfaces file.
            – Rahul Bohare
            Feb 16 at 15:29










          • It might have something to do with wifi priority, you could try to 'forget' the known wifi in order to be sure that the added network connection works and, if yes, you can try to change the priority with one of these methods :askubuntu.com/questions/165679/…
            – Félicien
            Feb 16 at 15:42












          up vote
          0
          down vote










          up vote
          0
          down vote









          You can edit the interface file /etc/network/interfaces and add the informations about the WiFi you want to connect to :



          network=
          ssid="testing"
          psk="testingPassword"






          share|improve this answer














          You can edit the interface file /etc/network/interfaces and add the informations about the WiFi you want to connect to :



          network=
          ssid="testing"
          psk="testingPassword"







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 16 at 15:18

























          answered Feb 16 at 15:09









          Félicien

          8471516




          8471516











          • Also, just to make sure, the ssid and psk are written without the " ", right?
            – Rahul Bohare
            Feb 16 at 15:20










          • Mmhh, It works with them , but maibe they are not mandatory
            – Félicien
            Feb 16 at 15:21










          • Tried with and then without quotes, it's still connecting to the previously known network, and not the one specified in interfaces file.
            – Rahul Bohare
            Feb 16 at 15:29










          • It might have something to do with wifi priority, you could try to 'forget' the known wifi in order to be sure that the added network connection works and, if yes, you can try to change the priority with one of these methods :askubuntu.com/questions/165679/…
            – Félicien
            Feb 16 at 15:42
















          • Also, just to make sure, the ssid and psk are written without the " ", right?
            – Rahul Bohare
            Feb 16 at 15:20










          • Mmhh, It works with them , but maibe they are not mandatory
            – Félicien
            Feb 16 at 15:21










          • Tried with and then without quotes, it's still connecting to the previously known network, and not the one specified in interfaces file.
            – Rahul Bohare
            Feb 16 at 15:29










          • It might have something to do with wifi priority, you could try to 'forget' the known wifi in order to be sure that the added network connection works and, if yes, you can try to change the priority with one of these methods :askubuntu.com/questions/165679/…
            – Félicien
            Feb 16 at 15:42















          Also, just to make sure, the ssid and psk are written without the " ", right?
          – Rahul Bohare
          Feb 16 at 15:20




          Also, just to make sure, the ssid and psk are written without the " ", right?
          – Rahul Bohare
          Feb 16 at 15:20












          Mmhh, It works with them , but maibe they are not mandatory
          – Félicien
          Feb 16 at 15:21




          Mmhh, It works with them , but maibe they are not mandatory
          – Félicien
          Feb 16 at 15:21












          Tried with and then without quotes, it's still connecting to the previously known network, and not the one specified in interfaces file.
          – Rahul Bohare
          Feb 16 at 15:29




          Tried with and then without quotes, it's still connecting to the previously known network, and not the one specified in interfaces file.
          – Rahul Bohare
          Feb 16 at 15:29












          It might have something to do with wifi priority, you could try to 'forget' the known wifi in order to be sure that the added network connection works and, if yes, you can try to change the priority with one of these methods :askubuntu.com/questions/165679/…
          – Félicien
          Feb 16 at 15:42




          It might have something to do with wifi priority, you could try to 'forget' the known wifi in order to be sure that the added network connection works and, if yes, you can try to change the priority with one of these methods :askubuntu.com/questions/165679/…
          – Félicien
          Feb 16 at 15:42

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006818%2fautomatically-connect-ubuntu-to-a-specific-wifi-at-startup%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491