What is apt. I did some googling and its a command utility. So is it just a piece of software for handling repositories? What is the difference between apt and apt-get?
Advanced packaging tool or apt
for short is a tool to manipulate the .deb packages on your system or to be installed on your system. The apt-get
is the old name for the new apt
command, they are the same command. Then there is aptitude
and dpkg
that can do the same job and install/manipulate packages. The dpkg
being the original tool with apt-get
coming next then the aptitude
in terms of their development.
There seems to this "Ubuntu software center", which repository is that? Is it like Ubuntu's official repository? Or is it a collection of all the repositories on your computer?
Both it will have all applications available in the repositories contained in your /etc/apt/sources.list
and the files contained in the /etc/apt/sources.d/
. The directory being a new idea for easily adding a repository without editing the /etc/apt/sources.list
file. And it is where they prefer you install it from, their "official" place for installation of software.
How do you search for a package without using the Ubuntu software center (if it's even possible)?
In the Terminal
application apt-cache search package_name
will do a search of the cache for your package. Want to see the version to be installed apt-cache policy package_name
will show you the version installed if any, the versions available, the repository it comes from and if any newer version is available.
When you use apt for installing packages from a third party repository, it doesn't seem like you need to specify which repository. Thus it seems like when you add a repository, it all gets added to this one big abstract repository. Won't that cause name conflicts?
No there are strict naming practices for packages designed to avoid this conflict , in addition they have version number added onto to the to further allow packages to co-exist. When a repository is added you must make certain it is made for the version of the OS it runs on.
deb http://deb.debian.org/debian buster main contrib non-free
Above is a line for Debian Buster
it shows you the repository in the name, it could be stable
too as that is the status of Buster
until the next release in a month or two. When new stable is released the distribution would be updated if you had stable
for your line and not Buster
.
When you want to add a repository, it seems that you can do something like this, sudo add-apt-repository ppa:webupd8team/java How does apt locate that repository? There doesn't seem to be a URL of any sort.
I have no clue on how Ubuntu's system for that works I just use it when necessary and am too lazy to edit the file myself.