Monday, May 16, 2011
What is APT?
What is APT?
The APT (Advanced Packaging Tool ) works with the core libraries to handle the installation and removal of software on Debian GNU/Linux distribution.
You should usually use it in the following commands:
sudu apt-get install
in case you don’t know the name of the package you can search for the package by writing a keyword:
sudo apt-cache search
For example: Let’s say I would like to install chromium (chrome browser for Linux),
I don’t know the name of the package so if I try,
sudo apt-get install chromium
You will receive an error message saying: Invalid operation chromium
So I advise you to search it with:
sudo apt-cache search chromium
and then pick among all the packages listed the right one, in our example the:
chromium-browser - Chromium browser
Before installing the software we would probably would like to get more info about the package,
so lets check it with:
sudo apt-cache show chromium-browser
Now after we made sure the software is the correct one, you can easily install the package by typing:
sudo apt-get install chromium-browser
In case you find the software which you have installed not needed, you could remove it by writing :
sudo apt-get remove chromium-browser
In case you would like to remove the configuration file too, I advise you to enter:
sudo apt-get --purge remove chromium-browser
For adding a new personal package archive (ppa) repository:
sudo add-apt-repository ppa:<ppa-name>
In case you would like to know is a specific software tool is installed on your Linux machine, enter
sudo dpkg --get-selections | grep <software name>
If you would like to know where the package was installed on your hdd
(List files installed to your system from package-name), you can enter the following command:
dpkg -L <pkg name>
Lets say you have a dependency of a missing file but you don't know which package provides it,
how do you figure out the package's name, you can use apt-file command, first thing you should install it on your system:
sudo apt install apt-file
For updating the system cache since it's empty enter:
sudo apt-file update
Creates a researchable mapping between packages and their files.
for searching enter the command:
apt-file <file-name>
You would like to get a list of dependent packages:
apt-cache rdepends <pkg name>
comment:
A repository is a storage location from which software packages may be retrieved and installed on a computer. The list appears in the configuration file: /etc/apt/sources.list you can check it. By this file you can locate the desired packages and retrieve them, and also obtain information about available packages.
Labels:
Linux
Subscribe to:
Post Comments (Atom)
About
About Me
- GilC
- On my spare time I'm here writing for you guys, so lay back & enjoy the posts! if there are any special requests, feel free to send a message and i'll be glad posting new exciting topics ;-)
Labels
- Algorithms (1)
- Assembler (1)
- Bash (2)
- brain teasers (1)
- C++ (1)
- Debugging Techniques (4)
- Dynamic Programming (2)
- Linux (14)
- Linux kernel (11)
- math (1)
No comments:
Post a Comment