How do I add a line to my /etc/apt/sources.list?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







41















I am updating my Tor on Ubuntu and it states:




Do not use the packages in Ubuntu's universe. You'll need to set up our package repository before you can fetch Tor.




It then states that I have to add this line to your /etc/apt/sources.list file:



 deb http://deb.torproject.org/torproject.org <precise> main


I am uncertain how to add a line to /etc/apt/sources.list.










share|improve this question































    41















    I am updating my Tor on Ubuntu and it states:




    Do not use the packages in Ubuntu's universe. You'll need to set up our package repository before you can fetch Tor.




    It then states that I have to add this line to your /etc/apt/sources.list file:



     deb http://deb.torproject.org/torproject.org <precise> main


    I am uncertain how to add a line to /etc/apt/sources.list.










    share|improve this question



























      41












      41








      41


      20






      I am updating my Tor on Ubuntu and it states:




      Do not use the packages in Ubuntu's universe. You'll need to set up our package repository before you can fetch Tor.




      It then states that I have to add this line to your /etc/apt/sources.list file:



       deb http://deb.torproject.org/torproject.org <precise> main


      I am uncertain how to add a line to /etc/apt/sources.list.










      share|improve this question
















      I am updating my Tor on Ubuntu and it states:




      Do not use the packages in Ubuntu's universe. You'll need to set up our package repository before you can fetch Tor.




      It then states that I have to add this line to your /etc/apt/sources.list file:



       deb http://deb.torproject.org/torproject.org <precise> main


      I am uncertain how to add a line to /etc/apt/sources.list.







      apt






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 8 '16 at 14:29









      Braiam

      52.7k20138225




      52.7k20138225










      asked Oct 7 '12 at 21:16









      klintklint

      206133




      206133






















          7 Answers
          7






          active

          oldest

          votes


















          47














          Make a backup copy of your current sources.list file



          sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


          Append new line of text to current sources.list file





          • CLI



            echo "new line of text" | sudo tee -a /etc/apt/sources.list



          • GUI (Text Editor)



            sudo gedit /etc/apt/sources.list


          • Paste new line of text on new line at end of current sources.list text file in Text Editor.


          • Save and close sources.list


          Don't forget to update in order to use the new repository



          sudo apt-get update





          share|improve this answer

































            29














            In order to add a third-party repository, you first need the public keys for this repository which in this case you can grab from the Ubuntu key server:



            sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 886DDD89


            Now you can add the repository in /etc/apt/sources.list.d/ with add-apt-repository:



            sudo add-apt-repository "deb http://deb.torproject.org/torproject.org $(lsb_release -s -c) main"


            After adding any repository it is always needed to execute



            sudo apt-get update


            Now you can install the package for Tor itself. For complete instructions on how to install Tor correctly, see How to install Tor?



            This procedure can also be reversed.






            share|improve this answer





















            • 3





              +1, do not use /etc/apt/sources.list for third-party repos, use /etc/apt/sources.list.d/ instead.

              – hudolejev
              Nov 1 '12 at 21:44











            • @hudolejev how do you specify a file in the /etc/apt/sources.list.d/ using the command add-apt-repository? From the man page I can not figure it out it seems like it happens magically, however when using that command I keep seeing lines added to the file /etc/apt/sources.list instead

              – TPPZ
              Aug 8 '18 at 10:50











            • @TPPZ my previous comment is 6 years old, I don't quite remember the context. Maybe it was and answer to some other comment that is now deleted :/ Anyways, seems that add-apt-repository will only create separate files in sources.list.d for PPA repos, for others it will update sources.list: manpages.ubuntu.com/manpages/bionic/man1/…

              – hudolejev
              Sep 5 '18 at 6:39





















            5














            Easiest way on Ubuntu:



            Go to Ubuntu Software Centre > Edit > Software Sources > Add



            Paste the line from the Tor website into the APT line box.



            You could also manually edit /etc/apt/sources.list, but probably simplest to go through the Software Centre.



            Make sure to input the line correctly as well, e.g.



            deb http://deb.torproject.org/torproject.org precise main


            if you're using 12.04. If something goes wrong edit /etc/apt/sources.list to fix it.






            share|improve this answer

































              1














              First, make a backup. You can do so with:



              sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


              in the Terminal. Give your password and press Enter. It will not be shown, not even asterisks. Then run:



              gksudo gedit /etc/apt/sources.list


              and give your password.



              Add the line:



               deb http://deb.torproject.org/torproject.org main


              to the bottom of the file and use File->Save to save it.



              Then, go back to the terminal and run:



              sudo apt-get update


              and then continue following the instructions. This command and the one starting in sudo apt-get install may take a while. Additionally, the install command may give a:



              Do you want to continue[y/n]?


              prompt, where you must type y and press Enter to continue.






              share|improve this answer































                1














                You need not to edit default /etc/apt/sources.list, you better upgrade your Ubuntu to Saucy. Here Tor is in the official repository.



                See, my /etc/apt/sources.list:



                deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy main restricted universe multiverse
                deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-updates main restricted universe multiverse
                deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-backports main restricted universe multiverse
                deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-security main restricted universe multiverse


                Only 4 lines.



                I'm able to download and install the Tor package:



                # aptitude download tor
                Get: 1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy/universe tor amd64 0.2.3.25-1 [953 kB]
                84% [1 tor 799 kB/953 kB 84%]201 URI Done: http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/universe/t/tor/tor_0.2.3.25-1_amd64.deb
                RecivedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f
                ExpectedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f

                Fetched 953 kB in 4s (198 kB/s)


                According to http://torstatus.blutmagie.de Tor 0.2.3.25 on Linux, one of the common installations.






                share|improve this answer

































                  0














                  Basically sources.list is a text file you want to edit. Linux is all about file you can customize your ubuntu by changing files. so the basic way to edit files(adding or deleting text) is by using some of the text editor like:




                  • emacs,gedit(gui based)

                  • nano,vi,vim(cli based)


                  You can install them by typing sudo apt-get install text_editor_name.



                  type man text_editor_name for reading their mannual pages.





                  • If the status is you don't hav permissions, use:



                    chmod 777 filename








                  share|improve this answer



















                  • 1





                    why don't you just use sudo and not changing the permissions?

                    – ismailsunni
                    Aug 12 '15 at 10:38



















                  -1














                  Check this video link and see how to fix the problem



                  https://youtu.be/Q4UJ9MxqFEQ



                  Using Terminal text editor program 'nano' we can edit the file '/etc/apt/sources.list' .



                  Open terminal and type:



                  ' sudo nano /etc/apt/sources.list '



                  After making necessary changes, use the keyboard combination 'ctrl + o' and
                  after that press 'Enter' to save the file to its current location.



                  Use the keyboard combination 'ctrl + x' to exit nano.






                  share|improve this answer
























                  • Please include the essential parts of the answer here (list what all "necessary changes" have to be made).

                    – UniversallyUniqueID
                    Jun 6 '16 at 6:14












                  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',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  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%2f197564%2fhow-do-i-add-a-line-to-my-etc-apt-sources-list%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  7 Answers
                  7






                  active

                  oldest

                  votes








                  7 Answers
                  7






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  47














                  Make a backup copy of your current sources.list file



                  sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


                  Append new line of text to current sources.list file





                  • CLI



                    echo "new line of text" | sudo tee -a /etc/apt/sources.list



                  • GUI (Text Editor)



                    sudo gedit /etc/apt/sources.list


                  • Paste new line of text on new line at end of current sources.list text file in Text Editor.


                  • Save and close sources.list


                  Don't forget to update in order to use the new repository



                  sudo apt-get update





                  share|improve this answer






























                    47














                    Make a backup copy of your current sources.list file



                    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


                    Append new line of text to current sources.list file





                    • CLI



                      echo "new line of text" | sudo tee -a /etc/apt/sources.list



                    • GUI (Text Editor)



                      sudo gedit /etc/apt/sources.list


                    • Paste new line of text on new line at end of current sources.list text file in Text Editor.


                    • Save and close sources.list


                    Don't forget to update in order to use the new repository



                    sudo apt-get update





                    share|improve this answer




























                      47












                      47








                      47







                      Make a backup copy of your current sources.list file



                      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


                      Append new line of text to current sources.list file





                      • CLI



                        echo "new line of text" | sudo tee -a /etc/apt/sources.list



                      • GUI (Text Editor)



                        sudo gedit /etc/apt/sources.list


                      • Paste new line of text on new line at end of current sources.list text file in Text Editor.


                      • Save and close sources.list


                      Don't forget to update in order to use the new repository



                      sudo apt-get update





                      share|improve this answer















                      Make a backup copy of your current sources.list file



                      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


                      Append new line of text to current sources.list file





                      • CLI



                        echo "new line of text" | sudo tee -a /etc/apt/sources.list



                      • GUI (Text Editor)



                        sudo gedit /etc/apt/sources.list


                      • Paste new line of text on new line at end of current sources.list text file in Text Editor.


                      • Save and close sources.list


                      Don't forget to update in order to use the new repository



                      sudo apt-get update






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Feb 14 '14 at 5:23









                      jtd

                      2,00711627




                      2,00711627










                      answered Oct 8 '12 at 8:39







                      user61928
































                          29














                          In order to add a third-party repository, you first need the public keys for this repository which in this case you can grab from the Ubuntu key server:



                          sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 886DDD89


                          Now you can add the repository in /etc/apt/sources.list.d/ with add-apt-repository:



                          sudo add-apt-repository "deb http://deb.torproject.org/torproject.org $(lsb_release -s -c) main"


                          After adding any repository it is always needed to execute



                          sudo apt-get update


                          Now you can install the package for Tor itself. For complete instructions on how to install Tor correctly, see How to install Tor?



                          This procedure can also be reversed.






                          share|improve this answer





















                          • 3





                            +1, do not use /etc/apt/sources.list for third-party repos, use /etc/apt/sources.list.d/ instead.

                            – hudolejev
                            Nov 1 '12 at 21:44











                          • @hudolejev how do you specify a file in the /etc/apt/sources.list.d/ using the command add-apt-repository? From the man page I can not figure it out it seems like it happens magically, however when using that command I keep seeing lines added to the file /etc/apt/sources.list instead

                            – TPPZ
                            Aug 8 '18 at 10:50











                          • @TPPZ my previous comment is 6 years old, I don't quite remember the context. Maybe it was and answer to some other comment that is now deleted :/ Anyways, seems that add-apt-repository will only create separate files in sources.list.d for PPA repos, for others it will update sources.list: manpages.ubuntu.com/manpages/bionic/man1/…

                            – hudolejev
                            Sep 5 '18 at 6:39


















                          29














                          In order to add a third-party repository, you first need the public keys for this repository which in this case you can grab from the Ubuntu key server:



                          sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 886DDD89


                          Now you can add the repository in /etc/apt/sources.list.d/ with add-apt-repository:



                          sudo add-apt-repository "deb http://deb.torproject.org/torproject.org $(lsb_release -s -c) main"


                          After adding any repository it is always needed to execute



                          sudo apt-get update


                          Now you can install the package for Tor itself. For complete instructions on how to install Tor correctly, see How to install Tor?



                          This procedure can also be reversed.






                          share|improve this answer





















                          • 3





                            +1, do not use /etc/apt/sources.list for third-party repos, use /etc/apt/sources.list.d/ instead.

                            – hudolejev
                            Nov 1 '12 at 21:44











                          • @hudolejev how do you specify a file in the /etc/apt/sources.list.d/ using the command add-apt-repository? From the man page I can not figure it out it seems like it happens magically, however when using that command I keep seeing lines added to the file /etc/apt/sources.list instead

                            – TPPZ
                            Aug 8 '18 at 10:50











                          • @TPPZ my previous comment is 6 years old, I don't quite remember the context. Maybe it was and answer to some other comment that is now deleted :/ Anyways, seems that add-apt-repository will only create separate files in sources.list.d for PPA repos, for others it will update sources.list: manpages.ubuntu.com/manpages/bionic/man1/…

                            – hudolejev
                            Sep 5 '18 at 6:39
















                          29












                          29








                          29







                          In order to add a third-party repository, you first need the public keys for this repository which in this case you can grab from the Ubuntu key server:



                          sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 886DDD89


                          Now you can add the repository in /etc/apt/sources.list.d/ with add-apt-repository:



                          sudo add-apt-repository "deb http://deb.torproject.org/torproject.org $(lsb_release -s -c) main"


                          After adding any repository it is always needed to execute



                          sudo apt-get update


                          Now you can install the package for Tor itself. For complete instructions on how to install Tor correctly, see How to install Tor?



                          This procedure can also be reversed.






                          share|improve this answer















                          In order to add a third-party repository, you first need the public keys for this repository which in this case you can grab from the Ubuntu key server:



                          sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 886DDD89


                          Now you can add the repository in /etc/apt/sources.list.d/ with add-apt-repository:



                          sudo add-apt-repository "deb http://deb.torproject.org/torproject.org $(lsb_release -s -c) main"


                          After adding any repository it is always needed to execute



                          sudo apt-get update


                          Now you can install the package for Tor itself. For complete instructions on how to install Tor correctly, see How to install Tor?



                          This procedure can also be reversed.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Apr 13 '17 at 12:25









                          Community

                          1




                          1










                          answered Oct 7 '12 at 23:28









                          zerwaszerwas

                          3,37311618




                          3,37311618








                          • 3





                            +1, do not use /etc/apt/sources.list for third-party repos, use /etc/apt/sources.list.d/ instead.

                            – hudolejev
                            Nov 1 '12 at 21:44











                          • @hudolejev how do you specify a file in the /etc/apt/sources.list.d/ using the command add-apt-repository? From the man page I can not figure it out it seems like it happens magically, however when using that command I keep seeing lines added to the file /etc/apt/sources.list instead

                            – TPPZ
                            Aug 8 '18 at 10:50











                          • @TPPZ my previous comment is 6 years old, I don't quite remember the context. Maybe it was and answer to some other comment that is now deleted :/ Anyways, seems that add-apt-repository will only create separate files in sources.list.d for PPA repos, for others it will update sources.list: manpages.ubuntu.com/manpages/bionic/man1/…

                            – hudolejev
                            Sep 5 '18 at 6:39
















                          • 3





                            +1, do not use /etc/apt/sources.list for third-party repos, use /etc/apt/sources.list.d/ instead.

                            – hudolejev
                            Nov 1 '12 at 21:44











                          • @hudolejev how do you specify a file in the /etc/apt/sources.list.d/ using the command add-apt-repository? From the man page I can not figure it out it seems like it happens magically, however when using that command I keep seeing lines added to the file /etc/apt/sources.list instead

                            – TPPZ
                            Aug 8 '18 at 10:50











                          • @TPPZ my previous comment is 6 years old, I don't quite remember the context. Maybe it was and answer to some other comment that is now deleted :/ Anyways, seems that add-apt-repository will only create separate files in sources.list.d for PPA repos, for others it will update sources.list: manpages.ubuntu.com/manpages/bionic/man1/…

                            – hudolejev
                            Sep 5 '18 at 6:39










                          3




                          3





                          +1, do not use /etc/apt/sources.list for third-party repos, use /etc/apt/sources.list.d/ instead.

                          – hudolejev
                          Nov 1 '12 at 21:44





                          +1, do not use /etc/apt/sources.list for third-party repos, use /etc/apt/sources.list.d/ instead.

                          – hudolejev
                          Nov 1 '12 at 21:44













                          @hudolejev how do you specify a file in the /etc/apt/sources.list.d/ using the command add-apt-repository? From the man page I can not figure it out it seems like it happens magically, however when using that command I keep seeing lines added to the file /etc/apt/sources.list instead

                          – TPPZ
                          Aug 8 '18 at 10:50





                          @hudolejev how do you specify a file in the /etc/apt/sources.list.d/ using the command add-apt-repository? From the man page I can not figure it out it seems like it happens magically, however when using that command I keep seeing lines added to the file /etc/apt/sources.list instead

                          – TPPZ
                          Aug 8 '18 at 10:50













                          @TPPZ my previous comment is 6 years old, I don't quite remember the context. Maybe it was and answer to some other comment that is now deleted :/ Anyways, seems that add-apt-repository will only create separate files in sources.list.d for PPA repos, for others it will update sources.list: manpages.ubuntu.com/manpages/bionic/man1/…

                          – hudolejev
                          Sep 5 '18 at 6:39







                          @TPPZ my previous comment is 6 years old, I don't quite remember the context. Maybe it was and answer to some other comment that is now deleted :/ Anyways, seems that add-apt-repository will only create separate files in sources.list.d for PPA repos, for others it will update sources.list: manpages.ubuntu.com/manpages/bionic/man1/…

                          – hudolejev
                          Sep 5 '18 at 6:39













                          5














                          Easiest way on Ubuntu:



                          Go to Ubuntu Software Centre > Edit > Software Sources > Add



                          Paste the line from the Tor website into the APT line box.



                          You could also manually edit /etc/apt/sources.list, but probably simplest to go through the Software Centre.



                          Make sure to input the line correctly as well, e.g.



                          deb http://deb.torproject.org/torproject.org precise main


                          if you're using 12.04. If something goes wrong edit /etc/apt/sources.list to fix it.






                          share|improve this answer






























                            5














                            Easiest way on Ubuntu:



                            Go to Ubuntu Software Centre > Edit > Software Sources > Add



                            Paste the line from the Tor website into the APT line box.



                            You could also manually edit /etc/apt/sources.list, but probably simplest to go through the Software Centre.



                            Make sure to input the line correctly as well, e.g.



                            deb http://deb.torproject.org/torproject.org precise main


                            if you're using 12.04. If something goes wrong edit /etc/apt/sources.list to fix it.






                            share|improve this answer




























                              5












                              5








                              5







                              Easiest way on Ubuntu:



                              Go to Ubuntu Software Centre > Edit > Software Sources > Add



                              Paste the line from the Tor website into the APT line box.



                              You could also manually edit /etc/apt/sources.list, but probably simplest to go through the Software Centre.



                              Make sure to input the line correctly as well, e.g.



                              deb http://deb.torproject.org/torproject.org precise main


                              if you're using 12.04. If something goes wrong edit /etc/apt/sources.list to fix it.






                              share|improve this answer















                              Easiest way on Ubuntu:



                              Go to Ubuntu Software Centre > Edit > Software Sources > Add



                              Paste the line from the Tor website into the APT line box.



                              You could also manually edit /etc/apt/sources.list, but probably simplest to go through the Software Centre.



                              Make sure to input the line correctly as well, e.g.



                              deb http://deb.torproject.org/torproject.org precise main


                              if you're using 12.04. If something goes wrong edit /etc/apt/sources.list to fix it.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Oct 8 '12 at 8:29









                              penreturns

                              5,31042642




                              5,31042642










                              answered Oct 7 '12 at 21:36









                              ngmngm

                              1513




                              1513























                                  1














                                  First, make a backup. You can do so with:



                                  sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


                                  in the Terminal. Give your password and press Enter. It will not be shown, not even asterisks. Then run:



                                  gksudo gedit /etc/apt/sources.list


                                  and give your password.



                                  Add the line:



                                   deb http://deb.torproject.org/torproject.org main


                                  to the bottom of the file and use File->Save to save it.



                                  Then, go back to the terminal and run:



                                  sudo apt-get update


                                  and then continue following the instructions. This command and the one starting in sudo apt-get install may take a while. Additionally, the install command may give a:



                                  Do you want to continue[y/n]?


                                  prompt, where you must type y and press Enter to continue.






                                  share|improve this answer




























                                    1














                                    First, make a backup. You can do so with:



                                    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


                                    in the Terminal. Give your password and press Enter. It will not be shown, not even asterisks. Then run:



                                    gksudo gedit /etc/apt/sources.list


                                    and give your password.



                                    Add the line:



                                     deb http://deb.torproject.org/torproject.org main


                                    to the bottom of the file and use File->Save to save it.



                                    Then, go back to the terminal and run:



                                    sudo apt-get update


                                    and then continue following the instructions. This command and the one starting in sudo apt-get install may take a while. Additionally, the install command may give a:



                                    Do you want to continue[y/n]?


                                    prompt, where you must type y and press Enter to continue.






                                    share|improve this answer


























                                      1












                                      1








                                      1







                                      First, make a backup. You can do so with:



                                      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


                                      in the Terminal. Give your password and press Enter. It will not be shown, not even asterisks. Then run:



                                      gksudo gedit /etc/apt/sources.list


                                      and give your password.



                                      Add the line:



                                       deb http://deb.torproject.org/torproject.org main


                                      to the bottom of the file and use File->Save to save it.



                                      Then, go back to the terminal and run:



                                      sudo apt-get update


                                      and then continue following the instructions. This command and the one starting in sudo apt-get install may take a while. Additionally, the install command may give a:



                                      Do you want to continue[y/n]?


                                      prompt, where you must type y and press Enter to continue.






                                      share|improve this answer













                                      First, make a backup. You can do so with:



                                      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


                                      in the Terminal. Give your password and press Enter. It will not be shown, not even asterisks. Then run:



                                      gksudo gedit /etc/apt/sources.list


                                      and give your password.



                                      Add the line:



                                       deb http://deb.torproject.org/torproject.org main


                                      to the bottom of the file and use File->Save to save it.



                                      Then, go back to the terminal and run:



                                      sudo apt-get update


                                      and then continue following the instructions. This command and the one starting in sudo apt-get install may take a while. Additionally, the install command may give a:



                                      Do you want to continue[y/n]?


                                      prompt, where you must type y and press Enter to continue.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Oct 7 '12 at 21:33









                                      hexafractionhexafraction

                                      16.5k105586




                                      16.5k105586























                                          1














                                          You need not to edit default /etc/apt/sources.list, you better upgrade your Ubuntu to Saucy. Here Tor is in the official repository.



                                          See, my /etc/apt/sources.list:



                                          deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy main restricted universe multiverse
                                          deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-updates main restricted universe multiverse
                                          deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-backports main restricted universe multiverse
                                          deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-security main restricted universe multiverse


                                          Only 4 lines.



                                          I'm able to download and install the Tor package:



                                          # aptitude download tor
                                          Get: 1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy/universe tor amd64 0.2.3.25-1 [953 kB]
                                          84% [1 tor 799 kB/953 kB 84%]201 URI Done: http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/universe/t/tor/tor_0.2.3.25-1_amd64.deb
                                          RecivedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f
                                          ExpectedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f

                                          Fetched 953 kB in 4s (198 kB/s)


                                          According to http://torstatus.blutmagie.de Tor 0.2.3.25 on Linux, one of the common installations.






                                          share|improve this answer






























                                            1














                                            You need not to edit default /etc/apt/sources.list, you better upgrade your Ubuntu to Saucy. Here Tor is in the official repository.



                                            See, my /etc/apt/sources.list:



                                            deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy main restricted universe multiverse
                                            deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-updates main restricted universe multiverse
                                            deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-backports main restricted universe multiverse
                                            deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-security main restricted universe multiverse


                                            Only 4 lines.



                                            I'm able to download and install the Tor package:



                                            # aptitude download tor
                                            Get: 1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy/universe tor amd64 0.2.3.25-1 [953 kB]
                                            84% [1 tor 799 kB/953 kB 84%]201 URI Done: http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/universe/t/tor/tor_0.2.3.25-1_amd64.deb
                                            RecivedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f
                                            ExpectedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f

                                            Fetched 953 kB in 4s (198 kB/s)


                                            According to http://torstatus.blutmagie.de Tor 0.2.3.25 on Linux, one of the common installations.






                                            share|improve this answer




























                                              1












                                              1








                                              1







                                              You need not to edit default /etc/apt/sources.list, you better upgrade your Ubuntu to Saucy. Here Tor is in the official repository.



                                              See, my /etc/apt/sources.list:



                                              deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy main restricted universe multiverse
                                              deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-updates main restricted universe multiverse
                                              deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-backports main restricted universe multiverse
                                              deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-security main restricted universe multiverse


                                              Only 4 lines.



                                              I'm able to download and install the Tor package:



                                              # aptitude download tor
                                              Get: 1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy/universe tor amd64 0.2.3.25-1 [953 kB]
                                              84% [1 tor 799 kB/953 kB 84%]201 URI Done: http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/universe/t/tor/tor_0.2.3.25-1_amd64.deb
                                              RecivedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f
                                              ExpectedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f

                                              Fetched 953 kB in 4s (198 kB/s)


                                              According to http://torstatus.blutmagie.de Tor 0.2.3.25 on Linux, one of the common installations.






                                              share|improve this answer















                                              You need not to edit default /etc/apt/sources.list, you better upgrade your Ubuntu to Saucy. Here Tor is in the official repository.



                                              See, my /etc/apt/sources.list:



                                              deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy main restricted universe multiverse
                                              deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-updates main restricted universe multiverse
                                              deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-backports main restricted universe multiverse
                                              deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy-security main restricted universe multiverse


                                              Only 4 lines.



                                              I'm able to download and install the Tor package:



                                              # aptitude download tor
                                              Get: 1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ saucy/universe tor amd64 0.2.3.25-1 [953 kB]
                                              84% [1 tor 799 kB/953 kB 84%]201 URI Done: http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/universe/t/tor/tor_0.2.3.25-1_amd64.deb
                                              RecivedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f
                                              ExpectedHash: MD5Sum:1cb3ed029c169c3a5e528dd7d28cc60f

                                              Fetched 953 kB in 4s (198 kB/s)


                                              According to http://torstatus.blutmagie.de Tor 0.2.3.25 on Linux, one of the common installations.







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Feb 16 '14 at 17:52

























                                              answered Feb 16 '14 at 16:47









                                              user2496user2496

                                              1264




                                              1264























                                                  0














                                                  Basically sources.list is a text file you want to edit. Linux is all about file you can customize your ubuntu by changing files. so the basic way to edit files(adding or deleting text) is by using some of the text editor like:




                                                  • emacs,gedit(gui based)

                                                  • nano,vi,vim(cli based)


                                                  You can install them by typing sudo apt-get install text_editor_name.



                                                  type man text_editor_name for reading their mannual pages.





                                                  • If the status is you don't hav permissions, use:



                                                    chmod 777 filename








                                                  share|improve this answer



















                                                  • 1





                                                    why don't you just use sudo and not changing the permissions?

                                                    – ismailsunni
                                                    Aug 12 '15 at 10:38
















                                                  0














                                                  Basically sources.list is a text file you want to edit. Linux is all about file you can customize your ubuntu by changing files. so the basic way to edit files(adding or deleting text) is by using some of the text editor like:




                                                  • emacs,gedit(gui based)

                                                  • nano,vi,vim(cli based)


                                                  You can install them by typing sudo apt-get install text_editor_name.



                                                  type man text_editor_name for reading their mannual pages.





                                                  • If the status is you don't hav permissions, use:



                                                    chmod 777 filename








                                                  share|improve this answer



















                                                  • 1





                                                    why don't you just use sudo and not changing the permissions?

                                                    – ismailsunni
                                                    Aug 12 '15 at 10:38














                                                  0












                                                  0








                                                  0







                                                  Basically sources.list is a text file you want to edit. Linux is all about file you can customize your ubuntu by changing files. so the basic way to edit files(adding or deleting text) is by using some of the text editor like:




                                                  • emacs,gedit(gui based)

                                                  • nano,vi,vim(cli based)


                                                  You can install them by typing sudo apt-get install text_editor_name.



                                                  type man text_editor_name for reading their mannual pages.





                                                  • If the status is you don't hav permissions, use:



                                                    chmod 777 filename








                                                  share|improve this answer













                                                  Basically sources.list is a text file you want to edit. Linux is all about file you can customize your ubuntu by changing files. so the basic way to edit files(adding or deleting text) is by using some of the text editor like:




                                                  • emacs,gedit(gui based)

                                                  • nano,vi,vim(cli based)


                                                  You can install them by typing sudo apt-get install text_editor_name.



                                                  type man text_editor_name for reading their mannual pages.





                                                  • If the status is you don't hav permissions, use:



                                                    chmod 777 filename









                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Feb 14 '14 at 12:23









                                                  kashminderkashminder

                                                  1,100815




                                                  1,100815








                                                  • 1





                                                    why don't you just use sudo and not changing the permissions?

                                                    – ismailsunni
                                                    Aug 12 '15 at 10:38














                                                  • 1





                                                    why don't you just use sudo and not changing the permissions?

                                                    – ismailsunni
                                                    Aug 12 '15 at 10:38








                                                  1




                                                  1





                                                  why don't you just use sudo and not changing the permissions?

                                                  – ismailsunni
                                                  Aug 12 '15 at 10:38





                                                  why don't you just use sudo and not changing the permissions?

                                                  – ismailsunni
                                                  Aug 12 '15 at 10:38











                                                  -1














                                                  Check this video link and see how to fix the problem



                                                  https://youtu.be/Q4UJ9MxqFEQ



                                                  Using Terminal text editor program 'nano' we can edit the file '/etc/apt/sources.list' .



                                                  Open terminal and type:



                                                  ' sudo nano /etc/apt/sources.list '



                                                  After making necessary changes, use the keyboard combination 'ctrl + o' and
                                                  after that press 'Enter' to save the file to its current location.



                                                  Use the keyboard combination 'ctrl + x' to exit nano.






                                                  share|improve this answer
























                                                  • Please include the essential parts of the answer here (list what all "necessary changes" have to be made).

                                                    – UniversallyUniqueID
                                                    Jun 6 '16 at 6:14
















                                                  -1














                                                  Check this video link and see how to fix the problem



                                                  https://youtu.be/Q4UJ9MxqFEQ



                                                  Using Terminal text editor program 'nano' we can edit the file '/etc/apt/sources.list' .



                                                  Open terminal and type:



                                                  ' sudo nano /etc/apt/sources.list '



                                                  After making necessary changes, use the keyboard combination 'ctrl + o' and
                                                  after that press 'Enter' to save the file to its current location.



                                                  Use the keyboard combination 'ctrl + x' to exit nano.






                                                  share|improve this answer
























                                                  • Please include the essential parts of the answer here (list what all "necessary changes" have to be made).

                                                    – UniversallyUniqueID
                                                    Jun 6 '16 at 6:14














                                                  -1












                                                  -1








                                                  -1







                                                  Check this video link and see how to fix the problem



                                                  https://youtu.be/Q4UJ9MxqFEQ



                                                  Using Terminal text editor program 'nano' we can edit the file '/etc/apt/sources.list' .



                                                  Open terminal and type:



                                                  ' sudo nano /etc/apt/sources.list '



                                                  After making necessary changes, use the keyboard combination 'ctrl + o' and
                                                  after that press 'Enter' to save the file to its current location.



                                                  Use the keyboard combination 'ctrl + x' to exit nano.






                                                  share|improve this answer













                                                  Check this video link and see how to fix the problem



                                                  https://youtu.be/Q4UJ9MxqFEQ



                                                  Using Terminal text editor program 'nano' we can edit the file '/etc/apt/sources.list' .



                                                  Open terminal and type:



                                                  ' sudo nano /etc/apt/sources.list '



                                                  After making necessary changes, use the keyboard combination 'ctrl + o' and
                                                  after that press 'Enter' to save the file to its current location.



                                                  Use the keyboard combination 'ctrl + x' to exit nano.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Jun 6 '16 at 5:57









                                                  Appulal SebastianAppulal Sebastian

                                                  11




                                                  11













                                                  • Please include the essential parts of the answer here (list what all "necessary changes" have to be made).

                                                    – UniversallyUniqueID
                                                    Jun 6 '16 at 6:14



















                                                  • Please include the essential parts of the answer here (list what all "necessary changes" have to be made).

                                                    – UniversallyUniqueID
                                                    Jun 6 '16 at 6:14

















                                                  Please include the essential parts of the answer here (list what all "necessary changes" have to be made).

                                                  – UniversallyUniqueID
                                                  Jun 6 '16 at 6:14





                                                  Please include the essential parts of the answer here (list what all "necessary changes" have to be made).

                                                  – UniversallyUniqueID
                                                  Jun 6 '16 at 6:14


















                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Ask Ubuntu!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f197564%2fhow-do-i-add-a-line-to-my-etc-apt-sources-list%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  Human spaceflight

                                                  Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                                                  張江高科駅