1

On the official website, they say I have to put this line in my source.list

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian <mydist> contrib

and at other websites I saw this, but what is the difference?

echo 'deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian' $(lsb_release -sc) contrib | sudo tee /etc/apt/sources.list.d/virtualbox.list

This is the part I don't understand

| sudo tee /etc/apt/sources.list.d/virtualbox.list

What is the reason?

0
1

When you run in terminal:

echo 'deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian' $(lsb_release -sc) contrib | sudo tee /etc/apt/sources.list.d/virtualbox.list

It will write the output of echo 'deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib' to a file named /etc/apt/sources.list.d/virtualbox.list

It's working the same as adding:

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian <mydist>     
contrib

to /etc/sources.list

The diferrens is that the files is located in different places. One to /etc/apt/sources.list.d/virtualbox.list and another to /etc/sources.list

The contents of /etc/apt/sources.list.d/virtualbox.list are:

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib 

and the contents of /etc/sources.list are:

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian <mydist> contrib

NOTE: replace <mydist> with the output of lsb_release -sc command

$(lsb_release -sc) = <mydist>

1
  • So if i use echo 'deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian' $(lsb_release -sc) contrib | sudo tee /etc/apt/sources.list.d/virtualbox.list Then are <mydist> contrib missing ? and sources.list is empty if i use this line ? echo 'deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian' $(lsb_release -sc) contrib | sudo tee /etc/apt/sources.list.d/virtualbox.list – yodi Mar 16 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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