title: apt-get proxy: Permission denied
body: <p>I am trying to make a bash script that will set up a proxy on my computer running ubuntu studio. This [1] tells me that I should set up the proxies for apt-get and Update Manager by creating a file 95proxies in /etc/apt/apt.conf.d/.</p>
  
  <p>the problem is when I run this code.</p>
  
  <pre><code>sudo echo "Acquire::http::proxy "http://myproxy.server.com:8080/";
  Acquire::ftp::proxy "ftp://myproxy.server.com:8080/";
  Acquire::https::proxy "https://myproxy.server.com:8080/";
  " &gt; /etc/apt/apt.conf.d/95proxies
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>bash: /etc/apt/apt.conf.d/95proxies: Permission denied
  </code></pre>
  
  <p>I was able to create the file with touch by</p>
  
  <pre><code>sudo touch /etc/apt/apt.conf.d/95proxies
  </code></pre>
  
  <p>but when I go to put data in the file I still get the error message above.</p>
  
  <p>[1]
  <a href="https://askubuntu.com/questions/150210/how-do-i-set-systemwide-proxy-servers-in-xubuntu-lubuntu-or-ubuntu-studio">https://askubuntu.com/questions/150210/how-do-i-set-systemwide-proxy-servers-in-xubuntu-lubuntu-or-ubuntu-studio</a></p>