Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I am currently trying to download Linaro Lava onto my VirtualMachine. When I do this command I am getting a permission denied error:

echo 'deb trusty main' > /etc/apt/sources.d/lava.list

Some quick help on this would be appreciated

share|improve this question
put "sudo " in front of it please. – Rinzwind Jun 18 '14 at 15:48
Have you tried adding sudo first? or to log in as root? – Alvar Jun 18 '14 at 15:48

Your command should be,

sudo sh -c "echo 'deb trusty main' > /etc/apt/sources.d/lava.list"

Try to run the command in a subshell or otherwise you will get an permission denied error.

share|improve this answer

I guess, there are 2 things:

  1. I guess you're trying to run the command as the normal user, but only the root user can create a file there. So you should run the command with a sudo su beforehand to gain root privileges.
  2. You're putting it in /etc/apt/sources.d/lava.list, but it should be /etc/apt/sources.list.d/lava.list as apt usually checks the sources.list.d directory. But I'm not 100% sure whether that changed for Linaro Lava.

So, check

ls /etc/apt/

and if there's the directory sources.list.d then run:

sudo su
deb trusty main' > /etc/apt/sources.list.d/lava.list

but if there's the sources.d directory, then run:

sudo su
deb trusty main' > /etc/apt/sources.d/lava.list
share|improve this answer

Your Answer


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

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