Serie GNU/Linux: /usr/bin/ useful stuff --> aptitude

in #linux6 years ago

Sometimes you want to download some packages. On Windows you only need to download an executor , set up the main configuration and click on the 'finish' button. All this did it from a very gentle GUI. But on GNU/Linux is totally different. Yes, of course, we have packages managers that make installing packages very easy and stressless .But if something goes wrong you are unable to fix the problem using only a GUI. That's what exist a miracle tool called .... c-o-m-m-a-n-d l-i-n-e i-n-t-e-r-f-a-ce. Yeah!! You got it!!

CLI( Command Line Interface ) is something that only a fucking genius can imagine.It's very fast , efficient and using it you could resolve any troubleshoot you have. On GNU/Linux whatever you're going to do with the machine such as, downloading packages, analyze your network connection, write delete and remove files. You can do it with CLI on GNU/Linux. Right now,I writing this post using 'vim'.

So, Let's install a packages. First of all, exist many tool that you can use to download a packages, such as, 'dpkg'(a very low level packages tool), apt( a very high but complex packages tool) and 'aptitude'( a high level interface for apt).

Aptitude,actually is a comand-line-graphical-interface

aptitude.png

But is very very useful for noobies that don't understand or are very lazy to study the other high level tools and only they need to install packages quickly and efficiently.

So, I'm going to show you how aptitude work.First of all you're unable to download something that you don't know how it called. So, we open the terminal with CTRL + Alt + T and type the following command: aptitude search ?packages. Whatever you put on packages you should see a list of related packages on output of the command.This is, because we are using the '?'. This thing said to aptitude for seek pattern on search.This command list packages that you have installed ( 'i' ) or not installed ( 'p' ). This is very useful if you want to figure out what packages are installed in your PC.

Ok, we have choose the package we want , so, how we download it. Simple, type the following command: aptitude install package or aptitude package+ , press ENTER and that's all. Whatever style you choose aptitude will download the package.

But, If we aren't very happy about the package or even if we made a mistake we shall be able to remove the package. How we do that? with the following command: aptitude remove package or aptitude package- , press ENTER and ' don't worry , be happy '.

The command above should remove the packages, but some dependencies and configuration files are still on our machine. So , if we don't want any of this things on our machine, we need to do the following:aptitude purge package or aptitude package_ .

Assuming that we are very happy about the package that we downloaded, but the version of the package is very old . We need to upgraded it. How we do that? with aptitude is very simple.First, we need to update our local packages list to figure out if we have a new version of the package. So, we type the following command: aptitude update. It's should update the list, but now we need to upgrade the new version.

So, we type the following command: aptitude full-upgrade

It's should be upgrade the entire system.Other things you can do with aptitude are: hold and unhold package's version and reinstall failed packages;

If you want more info about aptitude, type man aptitude.

Sort:  

Congratulations @neumma! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!