Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  18] [ 0]  / answers: 1 / hits: 1289  / 2 Years ago, sat, january 8, 2022, 6:57:55

I just found that there is a apt command that you can use directly:



 $sudo apt 
apt 1.0.1ubuntu2 for amd64 compiled on Apr 10 2014 13:03:39
Usage: apt [options] command

CLI for apt.
Basic commands:
list - list packages based on package names
search - search in package descriptions
show - show package details
update - update list of available packages
install - install packages
remove - remove packages
upgrade - upgrade the system by installing/upgrading packages
full-upgrade - upgrade the system by removing/installing/upgrading packages
edit-sources - edit the source information file


With similar syntax to apt-get. And it offers some coloring in the CLI interface. So I want to know if there are some major difference between apt and apt-* commands? Why do people seem to post commands as apt-get install and apt-cache search when they don' t need the additional options apt-* commands provide, while apt is shorter with all the similar functionality with additional coloring, and in my opinion, better output format? Is it only habit?



I see in the manual pages that apt is for end-users while other low-level commands are for scripts. So why is everyone posting those low-level commands instead of the more user-friendly high level command?


More From » apt

 Answers
6

The reason not many people recommend the simpler apt tool is because it's new. It wasn't in Ubuntu until the 14.04 release a week ago.



For most interactive uses it is equivalent but easier to use and looks nicer.


[#25633] Sunday, January 9, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kroapathe

Total Points: 445
Total Questions: 117
Total Answers: 99

Location: Botswana
Member since Sun, Sep 19, 2021
3 Years ago
;