I have come across several installation instructions that include the command deb
. But it appears that this command is not available on my installation.
Where can I get this command? Is there a work-around?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI have come across several installation instructions that include the command deb
. But it appears that this command is not available on my installation.
Where can I get this command? Is there a work-around?
deb
is not a command. It is used in /etc/apt/sources.list
file to indicate a Debian software repository.
From Ubuntu Manpage - sources.list:
The source list is designed to support any number of active sources and a variety of source media. The file lists one source per line, with the most preferred source listed first. The format of each line is: type uri args. The first item, type determines the format for args. uri is a Universal Resource Identifier (URI), which is a superset of the more specific and well-known Universal Resource Locator, or URL.
The deb type describes a typical two-level Debian archive, distribution/component. The format for a sources.list entry using the deb and deb-src types is:
deb [ options ] uri distribution [component1] [component2] [...]
The URI for the deb type must specify the base of the Debian distribution, from which APT will find the information it needs. distribution can specify an exact path, in which case the components must be omitted and distribution must end with a slash (/). This is useful for when the case only a particular sub-section of the archive denoted by the URI is of interest. If distribution does not specify an exact path, at least one component must be present.
So, if I have deb http://archive.ubuntu.com/ubuntu/ quantal main restricted
in the sources.list
file - it says: I have a Debian archive which is based on http://archive.ubuntu.com/ubuntu/
, the distribution is quantal
and the components are main
and restricted
.
deb
is not a unix command. If you have a line like the following (source for docker):
deb https://apt.dockerproject.org/repo ubuntu-xenial main
it is a line that must be available in your ubuntu sources.list
so that apt-get
can find future packages from this new source.
However, it's not a good practice to edit the /etc/apt/sources.list
file directly. Instead add the deb
line as an entry to a new .list
file inside the /etc/apt/sources.list.d/
directory. We will create a docker.list
file like this:
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
Once done, remember to perform a sudo apt-get update
and you should now be able to find new packages from this source easily.
Like the answer by @Eric Carvalho deb
is not command line If you have deb then url like this:
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
Edit
Like commit of @muru, you need to create new file with the extension .list
into /etc/apt/source.list.d/
folder:
Example: I want to download Oracle virtualbox, create new file :
sudo gedit /etc/apt/sources.list.d/oracle-virtualbox-trusty.list
Then copy and paste the line of deb into this file
apt
, not opt
(though there is an opt
) and 2. Never edit /etc/apt/sources.list
to add a line unless it is an Ubuntu mirror/official repository. Create a new file in /etc/apt/sources.list.d
with the extension .list
with that line.
.list
files in /etc/apt/sources.list.d
is what I do under these circumstances and is what I usually recommend. But I see no reason to insist manually added 3rd party software sources go in /etc/apt/sources.list.d
. Some conffiles are when possible best not edited by the user (e.g., use /etc/profile.d
over /etc/profile
, arguably use /etc/sudoers.d
over /etc/sudoers
), but sources.list
is often changed. (Even customized by Ubiquity to a regional mirror.)
Sep 12, 2014 at 6:06
/etc/apt/sources.list
isn't one of the conffiles that one can leave alone so as to facilitate smoother upgrading--as that is often (perhaps usually) the motivation behind strong suggestions to prefer making files in X.d
to editing X
. I am not suggesting Ubiquity enables third-party repos in any way. You haven't explained what's special about such repos, though, so as to make it actually wrong (i.e., "Never edit...") to put them in sources.list
.
Sep 12, 2014 at 7:49
On Ubuntu, you don't have to manually edit the source.list
to add the repository.
Instead, you can use add-apt-repository
, as you would do for a PPA.
For example, to add the LLVM repository, you can call:
sudo add-apt-repository 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty main'
As you can see, we must pass the deb
line as a single argument to the command.
Deb isn't actually a command (I thought so too, at first) -- Assuming you are trying to download/install a deb, do this (for example):
wget http://whatever.com/whatever.deb
then dpkg -i whatever.deb
then run the commands:
sudo apt-get update
This is not the CLI command.
This is information about some Debian package repository (used also by Ubuntu).
If you want to use this repository:
Open the file /etc/apt/sources.list
with administrator privileges.
Add to this file a line with information about the repository starting with deb ...
Save the file.
Run this command:
apt-get update
Now you will be able to use this repository.