Just like we mentioned in the table the “ apt” commands are designed to be more user friendly, hence this extra line of information! Which basically means we can give the command “apt list –upgradable” to see the list of packages that can be upgraded to their newest versions. The “ apt update” command ends by giving out the following clue to the user on what to do next.ġ6 packages can be upgraded. Let us see what I mean in action by taking a look at the command line “ apt-get update“ output: apt-get upgradeĪs you can see in the first 2 lines of “ apt-get upgrade“, the jobs of “Building dependency tree” and “Reading state information… Done” are executed. In the “ apt” command the “ update” sub-command does the job of “Building dependency tree” while in the “ apt-get” command this job is given to the “ upgrade” sub-command. You see, the “ update” command is usually followed by the “ upgrade” command (in most but not all cases). This is simply a matter of design change. Now let us try the command “ apt-get update” and see how this one’s output looks like Output: apt-get updateĪs you can see both these commands match line by line till the line that says “ Reading package lists… Done“Īfter that the newer “ apt update” command has the following 2 more lines Let us experiment by giving the command “ apt update” and have a look at the output. You can remember which is which by thinking “ apt” is shorter to type as compared to “ apt-get” and hence “ apt” is more useful in the command-line interface where we have to type things manually every-time! Has more functionality, and it’s used with bash-scripts more than apt because of guaranteed backward compatibility No progress bar, less user friendly as compared to “ apt” command More user friendly and has a progress bar Older version command to act as a front end for APT Newer version command to act as a front-end for APT Let’s take a look at a comparison of apt and apt-get. Here is a table of comparisons for when to use “apt” and when to use “ apt-get” for your package management needs. What is the difference between the commands “ apt update” and “ apt-get update“? Both these commands are used to download and update the package information from all of the configured sources, the difference is “apt-get” is old, more useful in scripts while the “apt” is newer and more useful in the command line interface. ![]() ![]() Let us see what these commands do, why there are 2 versions of this update command, and when to use each!įor those of you in a hurry, here is the short version of the answer! The Short Version of the Answer I have tried to stick to a beginner’s perspective avoiding unnecessary “technical terms” and I have also tried to keep this article concise so that you can get through the entire article in about 15 to 20 mins max! In this article, I have tried to explain what these commands mean and what their differences are. ![]() I guess to beginners, it just feels like a magic spell to get something installed! I was just happy that I was able to type something in the Terminal and that it actually worked and did what I wanted it to do! I did not pay much attention to what I actually typed in.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |