permission denied: /etc/apt/sources.list The 2019 Stack Overflow Developer Survey Results Are InCan't upgrade due to 404 errorI can't upgrade from 12.04 beta2 to 12.04 final, neither install any lensI am receiving a message saying I have duplicate sources but I can't seem to find a duplicate of the line described, any ideas?“Unable to connect” error with apt-get: possible proxy?Can not install updates on ubuntu 12.04 LTS!Some Applications don't open in Ubuntu 12.04 LTS (64 bit)Can't install linux headersFailed to fetch repositories; a particular casedo-release-upgrade from LTS to newer (but not newest!) LTSE: Sub-process /usr/bin/dpkg returned an error code (1) installing jdk and NetBeans

What do hard-Brexiteers want with respect to the Irish border?

A word that means fill it to the required quantity

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?

Can a flute soloist sit?

How to support a colleague who finds meetings extremely tiring?

Loose spokes after only a few rides

How can I add encounters in the Lost Mine of Phandelver campaign without giving PCs too much XP?

How to obtain a position of last non-zero element

Getting crown tickets for Statue of Liberty

Ubuntu Server install with full GUI

Accepted by European university, rejected by all American ones I applied to? Possible reasons?

How to notate time signature switching consistently every measure

Is it correct to say the Neural Networks are an alternative way of performing Maximum Likelihood Estimation? if not, why?

I am an eight letter word. What am I?

Why “相同意思的词” is called “同义词” instead of "同意词"?

What's the name of these plastic connectors

Why can't devices on different VLANs, but on the same subnet, communicate?

Get name of standard action overriden in Visualforce contorller

How to charge AirPods to keep battery healthy?

How come people say “Would of”?

If I can cast sorceries at instant speed, can I use sorcery-speed activated abilities at instant speed?

What information about me do stores get via my credit card?

How do PCB vias affect signal quality?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?



permission denied: /etc/apt/sources.list



The 2019 Stack Overflow Developer Survey Results Are InCan't upgrade due to 404 errorI can't upgrade from 12.04 beta2 to 12.04 final, neither install any lensI am receiving a message saying I have duplicate sources but I can't seem to find a duplicate of the line described, any ideas?“Unable to connect” error with apt-get: possible proxy?Can not install updates on ubuntu 12.04 LTS!Some Applications don't open in Ubuntu 12.04 LTS (64 bit)Can't install linux headersFailed to fetch repositories; a particular casedo-release-upgrade from LTS to newer (but not newest!) LTSE: Sub-process /usr/bin/dpkg returned an error code (1) installing jdk and NetBeans



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








16















I'm trying to install java jre, i usually do it like this



sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
sudo apt-get update
sudo apt-get install update-sun-jre
exit


but when i do



sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list


i see




permission denied: /etc/apt/sources.list




When i do



ls -l /etc/apt/sources.list



i see



-rw-r--r-- 1 root root 3360 Aug 26 01:45 /etc/apt/sources.list


When i do



sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo cat /etc/apt/sources.list.old | sudo tee /etc/apt/sources.list


i see



#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/

#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main


and the issue is not solved, i still see that permission error, I'm on a 64 bit laptop










share|improve this question






























    16















    I'm trying to install java jre, i usually do it like this



    sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
    sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
    sudo apt-get update
    sudo apt-get install update-sun-jre
    exit


    but when i do



    sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list


    i see




    permission denied: /etc/apt/sources.list




    When i do



    ls -l /etc/apt/sources.list



    i see



    -rw-r--r-- 1 root root 3360 Aug 26 01:45 /etc/apt/sources.list


    When i do



    sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
    sudo cat /etc/apt/sources.list.old | sudo tee /etc/apt/sources.list


    i see



    #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/

    #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
    #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted

    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
    deb-src http://lb.archive.ubuntu.com/ubuntu/ precise main restricted

    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
    deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted

    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://lb.archive.ubuntu.com/ubuntu/ precise universe
    deb-src http://lb.archive.ubuntu.com/ubuntu/ precise universe
    deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
    deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe

    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
    deb-src http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
    deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
    deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse

    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
    deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

    deb http://security.ubuntu.com/ubuntu precise-security main restricted
    deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
    deb http://security.ubuntu.com/ubuntu precise-security universe
    deb-src http://security.ubuntu.com/ubuntu precise-security universe
    deb http://security.ubuntu.com/ubuntu precise-security multiverse
    deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu precise partner
    # deb-src http://archive.canonical.com/ubuntu precise partner

    ## This software is not part of Ubuntu, but is offered by third-party
    ## developers who want to ship their latest software.
    deb http://extras.ubuntu.com/ubuntu precise main
    deb-src http://extras.ubuntu.com/ubuntu precise main


    and the issue is not solved, i still see that permission error, I'm on a 64 bit laptop










    share|improve this question


























      16












      16








      16


      10






      I'm trying to install java jre, i usually do it like this



      sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
      sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
      sudo apt-get update
      sudo apt-get install update-sun-jre
      exit


      but when i do



      sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list


      i see




      permission denied: /etc/apt/sources.list




      When i do



      ls -l /etc/apt/sources.list



      i see



      -rw-r--r-- 1 root root 3360 Aug 26 01:45 /etc/apt/sources.list


      When i do



      sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
      sudo cat /etc/apt/sources.list.old | sudo tee /etc/apt/sources.list


      i see



      #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/

      #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
      #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted

      # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
      # newer versions of the distribution.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise main restricted

      ## Major bug fix updates produced after the final release of the
      ## distribution.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted

      ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
      ## team. Also, please note that software in universe WILL NOT receive any
      ## review or updates from the Ubuntu security team.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise universe
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise universe
      deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe

      ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
      ## team, and may not be under a free licence. Please satisfy yourself as to
      ## your rights to use the software. Also, please note that software in
      ## multiverse WILL NOT receive any review or updates from the Ubuntu
      ## security team.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
      deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse

      ## N.B. software from this repository may not have been tested as
      ## extensively as that contained in the main release, although it includes
      ## newer versions of some applications which may provide useful features.
      ## Also, please note that software in backports WILL NOT receive any review
      ## or updates from the Ubuntu security team.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

      deb http://security.ubuntu.com/ubuntu precise-security main restricted
      deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
      deb http://security.ubuntu.com/ubuntu precise-security universe
      deb-src http://security.ubuntu.com/ubuntu precise-security universe
      deb http://security.ubuntu.com/ubuntu precise-security multiverse
      deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

      ## Uncomment the following two lines to add software from Canonical's
      ## 'partner' repository.
      ## This software is not part of Ubuntu, but is offered by Canonical and the
      ## respective vendors as a service to Ubuntu users.
      # deb http://archive.canonical.com/ubuntu precise partner
      # deb-src http://archive.canonical.com/ubuntu precise partner

      ## This software is not part of Ubuntu, but is offered by third-party
      ## developers who want to ship their latest software.
      deb http://extras.ubuntu.com/ubuntu precise main
      deb-src http://extras.ubuntu.com/ubuntu precise main


      and the issue is not solved, i still see that permission error, I'm on a 64 bit laptop










      share|improve this question
















      I'm trying to install java jre, i usually do it like this



      sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
      sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
      sudo apt-get update
      sudo apt-get install update-sun-jre
      exit


      but when i do



      sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list


      i see




      permission denied: /etc/apt/sources.list




      When i do



      ls -l /etc/apt/sources.list



      i see



      -rw-r--r-- 1 root root 3360 Aug 26 01:45 /etc/apt/sources.list


      When i do



      sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
      sudo cat /etc/apt/sources.list.old | sudo tee /etc/apt/sources.list


      i see



      #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/

      #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
      #deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted

      # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
      # newer versions of the distribution.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise main restricted

      ## Major bug fix updates produced after the final release of the
      ## distribution.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted

      ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
      ## team. Also, please note that software in universe WILL NOT receive any
      ## review or updates from the Ubuntu security team.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise universe
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise universe
      deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe

      ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
      ## team, and may not be under a free licence. Please satisfy yourself as to
      ## your rights to use the software. Also, please note that software in
      ## multiverse WILL NOT receive any review or updates from the Ubuntu
      ## security team.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
      deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse

      ## N.B. software from this repository may not have been tested as
      ## extensively as that contained in the main release, although it includes
      ## newer versions of some applications which may provide useful features.
      ## Also, please note that software in backports WILL NOT receive any review
      ## or updates from the Ubuntu security team.
      deb http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
      deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

      deb http://security.ubuntu.com/ubuntu precise-security main restricted
      deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
      deb http://security.ubuntu.com/ubuntu precise-security universe
      deb-src http://security.ubuntu.com/ubuntu precise-security universe
      deb http://security.ubuntu.com/ubuntu precise-security multiverse
      deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

      ## Uncomment the following two lines to add software from Canonical's
      ## 'partner' repository.
      ## This software is not part of Ubuntu, but is offered by Canonical and the
      ## respective vendors as a service to Ubuntu users.
      # deb http://archive.canonical.com/ubuntu precise partner
      # deb-src http://archive.canonical.com/ubuntu precise partner

      ## This software is not part of Ubuntu, but is offered by third-party
      ## developers who want to ship their latest software.
      deb http://extras.ubuntu.com/ubuntu precise main
      deb-src http://extras.ubuntu.com/ubuntu precise main


      and the issue is not solved, i still see that permission error, I'm on a 64 bit laptop







      12.04 installation permissions java






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 20 '12 at 16:06









      Mark Paskal

      2,66411827




      2,66411827










      asked Sep 7 '12 at 21:22









      LynobLynob

      2,790125395




      2,790125395




















          4 Answers
          4






          active

          oldest

          votes


















          36














          This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.



          However, please read my two part answer, this gives you a separate solution (sort of):



          1:



          Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.




          2:



          A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.



          PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.






          share|improve this answer






























            14














            What happens with the command is that echo is run as root, but not >>. Try the following instead:



            echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list


            alternatively, you could do it in two steps:



            sudo -i

            echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list

            exit





            share|improve this answer






























              2














              What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!



              sudo nano /etc/apt/sources.list


              Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.



              You can jump to the next command now...






              share|improve this answer























              • Nice, this helped me a lot!

                – Kirill Gusyatin
                Oct 20 '16 at 8:57


















              0














              Just simply add sudo again after >> will work for this one. Try this



              sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list



              I literally just had same issue and didn't want to backtrack and this worked for me.






              share|improve this answer








              New contributor




              Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                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%2f185268%2fpermission-denied-etc-apt-sources-list%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                36














                This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.



                However, please read my two part answer, this gives you a separate solution (sort of):



                1:



                Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.




                2:



                A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.



                PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.






                share|improve this answer



























                  36














                  This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.



                  However, please read my two part answer, this gives you a separate solution (sort of):



                  1:



                  Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.




                  2:



                  A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.



                  PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.






                  share|improve this answer

























                    36












                    36








                    36







                    This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.



                    However, please read my two part answer, this gives you a separate solution (sort of):



                    1:



                    Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.




                    2:



                    A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.



                    PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.






                    share|improve this answer













                    This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.



                    However, please read my two part answer, this gives you a separate solution (sort of):



                    1:



                    Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.




                    2:



                    A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.



                    PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Sep 7 '12 at 21:33









                    Thomas WardThomas Ward

                    45.2k23125178




                    45.2k23125178























                        14














                        What happens with the command is that echo is run as root, but not >>. Try the following instead:



                        echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list


                        alternatively, you could do it in two steps:



                        sudo -i

                        echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list

                        exit





                        share|improve this answer



























                          14














                          What happens with the command is that echo is run as root, but not >>. Try the following instead:



                          echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list


                          alternatively, you could do it in two steps:



                          sudo -i

                          echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list

                          exit





                          share|improve this answer

























                            14












                            14








                            14







                            What happens with the command is that echo is run as root, but not >>. Try the following instead:



                            echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list


                            alternatively, you could do it in two steps:



                            sudo -i

                            echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list

                            exit





                            share|improve this answer













                            What happens with the command is that echo is run as root, but not >>. Try the following instead:



                            echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list


                            alternatively, you could do it in two steps:



                            sudo -i

                            echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list

                            exit






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Sep 7 '12 at 21:35









                            mikewhatevermikewhatever

                            24.3k77085




                            24.3k77085





















                                2














                                What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!



                                sudo nano /etc/apt/sources.list


                                Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.



                                You can jump to the next command now...






                                share|improve this answer























                                • Nice, this helped me a lot!

                                  – Kirill Gusyatin
                                  Oct 20 '16 at 8:57















                                2














                                What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!



                                sudo nano /etc/apt/sources.list


                                Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.



                                You can jump to the next command now...






                                share|improve this answer























                                • Nice, this helped me a lot!

                                  – Kirill Gusyatin
                                  Oct 20 '16 at 8:57













                                2












                                2








                                2







                                What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!



                                sudo nano /etc/apt/sources.list


                                Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.



                                You can jump to the next command now...






                                share|improve this answer













                                What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!



                                sudo nano /etc/apt/sources.list


                                Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.



                                You can jump to the next command now...







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Jul 27 '16 at 4:51









                                MiladMilad

                                14218




                                14218












                                • Nice, this helped me a lot!

                                  – Kirill Gusyatin
                                  Oct 20 '16 at 8:57

















                                • Nice, this helped me a lot!

                                  – Kirill Gusyatin
                                  Oct 20 '16 at 8:57
















                                Nice, this helped me a lot!

                                – Kirill Gusyatin
                                Oct 20 '16 at 8:57





                                Nice, this helped me a lot!

                                – Kirill Gusyatin
                                Oct 20 '16 at 8:57











                                0














                                Just simply add sudo again after >> will work for this one. Try this



                                sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list



                                I literally just had same issue and didn't want to backtrack and this worked for me.






                                share|improve this answer








                                New contributor




                                Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.
























                                  0














                                  Just simply add sudo again after >> will work for this one. Try this



                                  sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list



                                  I literally just had same issue and didn't want to backtrack and this worked for me.






                                  share|improve this answer








                                  New contributor




                                  Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                  Check out our Code of Conduct.






















                                    0












                                    0








                                    0







                                    Just simply add sudo again after >> will work for this one. Try this



                                    sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list



                                    I literally just had same issue and didn't want to backtrack and this worked for me.






                                    share|improve this answer








                                    New contributor




                                    Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.










                                    Just simply add sudo again after >> will work for this one. Try this



                                    sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list



                                    I literally just had same issue and didn't want to backtrack and this worked for me.







                                    share|improve this answer








                                    New contributor




                                    Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    share|improve this answer



                                    share|improve this answer






                                    New contributor




                                    Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    answered 2 days ago









                                    Hippie ChildHippie Child

                                    11




                                    11




                                    New contributor




                                    Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.





                                    New contributor





                                    Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






                                    Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.



























                                        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%2f185268%2fpermission-denied-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

                                        Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

                                        How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

                                        Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü