Starting from Ubuntu 6.06, every time I release a new version of Ubuntu, I will lament that Linux is becoming more and more easy to use. In daily operations, apart from typing, I can basically use the mouse to complete it. However, Linux is a very wild system after all. If you can master some commands and shortcuts, you can release the "wild" of Linux. Therefore, I plan to write a series of articles to introduce some tips for improving the user experience. Because I use Debian as my daily system, my skills are basically applicable to all deb series starting from Ubuntu 6.06. Every time I release a new version of Ubuntu, I will sigh, linux is more and more easy to use. In daily operations, you can use the mouse to complete all the operations except typing. However, Linux is a very wild system after all. If you can master some commands and shortcuts, you can release the "wild" of Linux. Therefore, I plan to write a series of articles to introduce some tips for improving the user experience. Since I use Debian as my daily system, my skills are basically applicable to all deb series releases, and most of them apply to other releases. Of course, the title of this article determines that it is only applicable to the release of the deb series.
Brief Introduction
I believe anyone who has used Ubuntu should have heard of it.apt-get
This command is enough. Apt can be regarded as a system, wheredpkg
Is the underlying tool, mainly used to install and uninstall software..deb
File Processing, andapt-*
It is a high-level tool used to handle complex dependencies or provide a more convenient user experience.
In daily applications, the most frequently used commands areaptitude
Andapt-file
These two commands basically meet most of my management software requirements.dpkg
Andapt-get
. If you are a command line player and often install/upgrade some software packages, or encounter commands that are not yet installed in the system, you will loveaptitude
Andapt-file
The two tools are as follows :-)
Aptitude
If you have used Ubuntu or Debian two years ago, you must know, a graphical APT front-end. You can search for software and install it. Whileaptitude
It is a command line-based front-end. In aptitude, you can easily search, install, update, and perform other operations. You need to remember several shortcut keys. Let's look at some practical examples. First, enter the command on the terminal.
sudo aptitude
You can view the main interface of aptitude (the latest Ubuntu does not include aptitude by default, and you need to install sudo apt-get install aptitude on your own), as shown in:
If you have never used aptitude before, you must have done it now. You don't know what you can do next, just like using vim for the first time. Well, don't worry. I will tell you a shortcut key:ctrl-t
The shortcut key will open the menu, and you will be able to search for software, install software, and exit aptitude. However, after you are familiar with other commonly used shortcut keys, you will almost never be able to use them.ctrl-t
.
Let's take a look at how to implement common operations in aptitude. First, update the software list and system:
apt-get updateapt-get upgrade
Corresponding shortcut keys in aptitudeu
AndU
(Case sensitive ).
After you press u, the screen will scroll to display the files being downloaded.Upgradable Packages (XX)
Among them, XX is the number of software that can be updated currently. You can use the direction key and the Return key to expand this tree and see what software can be updated. But I am a lazy.U
Tells aptitude to update all software. Why? Are you cheated, not the shortcut key? Haha, don't worry. This just tells aptitude to perform the upgrade action on the software. aptitude only makes a mark and does not really do it, because you may have to regret it. In aptitude, after you mark all the software operations (the installation and uninstallation operations will be introduced later), you pressg
Key, aptitude will give you a new page, telling you all the software actions to be executed, you pressg
After the key, the installation will start.
Okay, now pressg
Let's take a look. aptitude opens a new tab, showing several categories of items, keeping the original version of software, software automatically installed to meet the dependency, software to be upgraded, and so on, you can use the arrow keys and enter keys to browse the software. If you are sure there is no problem, pressg
In this case, the installation will begin.
Alas, I'm so tired. Actually, it would be much easier to teach this thing on site or use a video to talk about it. However, I am a real man and don't know how to watch the screen, there is no time to install the relevant software. Just use text.
Now, you should be familiar with the aptitude interface. Www.linuxidc.com.j/k
To replace the direction keys, isn't it nice? What's even better is the aptitude artifact. The search and shortcut keys are the same as those of vim,/
!
Enter the complete or part of the software name, and press enter to search.n/N
You can jump to the next or previous search result. The shortcut key is the same as vim. When searching, you can use two simple regular expression symbols.^
And$
For example, you can search for any software starting with "gnome -".^gnome-
For example, if you want to find the complete software named "samba" without the software named "samba", you can search^samba$
. In addition, multiple keywords can be separated by spaces. For example, perl modules are named in the form of "lib ***-perl" and can be searched.lib -perl
For example, if you want to find an html form but do not know the exact name, you can search for it.lib html perl
Is it convenient?
OK, it's too convenient to search for software. It's more convenient to install it.+
That's all. I think everyone should have guessed what to use to uninstall the software? And the shortcut for purge is_
. If a software has been installed but can be upgraded, press+
You can also upgrade it. You can try to press the Enter key to open a new tab to view the software details. In addition to introducing the software, there will also be software dependencies and recommended software, if you find that a recommended software is good, you can move the cursor to pressi
Installation, all operations are natural. In some cases, this is very useful. For example, my newly installed system usually does not like to install the entire gnome-desktop-environment, because there are a lot of software I don't need. Therefore, only the basic system is installed. After installation, expand the gnome-desktop-environment dependency software in aptitude.+
.