{"id":978,"date":"2015-01-29T21:18:29","date_gmt":"2015-01-29T21:18:29","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=978"},"modified":"2015-01-29T21:18:29","modified_gmt":"2015-01-29T21:18:29","slug":"linux-commands-packages-how-many-and-what-for","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/linux-commands-packages-how-many-and-what-for\/","title":{"rendered":"Linux Commands + Packages &#8211; How Many, and What For?"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_978\" class=\"pvc_stats all  \" data-element-id=\"978\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>Linux has thousands of applications and programmes available to it, some are fundamental to its operation as part of the base system, and most are optional additions that can be added as required by the user. So how many are there and how can you find out what each does or what it depends on etc?<\/p>\n<p>There are projects such as the Linux Documentation Project:<\/p>\n<p><a href=\"https:\/\/wiki.tldp.org\/FrontPage\" target=\"_blank\"><span style=\"color: #00ff00;\">https:\/\/wiki.tldp.org\/FrontPage<\/span><\/a><\/p>\n<p>whose aim is to provide info on the system and many Apps etc. but you can find info on your own system using the man command, e.g.<\/p>\n<p><span style=\"color: #0000ff;\">man\u00a0a2enmod<\/span><\/p>\n<p><span style=\"color: #ff0000;\">A2ENMOD(8) A2ENMOD(8)<\/span><\/p>\n<p><span style=\"color: #ff0000;\">NAME<\/span><br \/>\n<span style=\"color: #ff0000;\"> a2enmod, a2dismod - enable or disable an apache2 module<\/span><\/p>\n<p><span style=\"color: #ff0000;\">SYNOPSIS<\/span><br \/>\n<span style=\"color: #ff0000;\"> a2enmod [module]<\/span><\/p>\n<p><span style=\"color: #ff0000;\">a2dismod [module]<\/span><\/p>\n<p><span style=\"color: #ff0000;\">DESCRIPTION<\/span><br \/>\n<span style=\"color: #ff0000;\"> This manual page documents briefly the a2enmod and a2dismod commands.<\/span><\/p>\n<p><span style=\"color: #ff0000;\">a2enmod is a script that enables the specified module within the apache2 con\u00c3:<\/span><br \/>\n<span style=\"color: #ff0000;\"> figuration....<\/span><\/p>\n<p>or by:<\/p>\n<p>stevee@raspberrypi ~ $ <span style=\"color: #0000ff;\">apt-cache<\/span><br \/>\n<span style=\"color: #ff0000;\">apt 0.9.7.9 for armhf compiled on Oct 28 2014 23:08:37<\/span><br \/>\n<span style=\"color: #ff0000;\">Usage: apt-cache [options] command<\/span><br \/>\n<span style=\"color: #ff0000;\"> apt-cache [options] showpkg pkg1 [pkg2 ...]<\/span><br \/>\n<span style=\"color: #ff0000;\"> apt-cache [options] showsrc pkg1 [pkg2 ...]<\/span><\/p>\n<p><span style=\"color: #ff0000;\">apt-cache is a low-level tool used to query information<\/span><br \/>\n<span style=\"color: #ff0000;\">from APT's binary cache files<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Commands:<\/span><br \/>\n<span style=\"color: #ff0000;\"> gencaches - Build both the package and source cache<\/span><br \/>\n<span style=\"color: #ff0000;\"> showpkg - Show some general information for a single package<\/span><br \/>\n<span style=\"color: #ff0000;\"> showsrc - Show source records<\/span><br \/>\n<span style=\"color: #ff0000;\"> stats - Show some basic statistics<\/span><br \/>\n<span style=\"color: #ff0000;\">dump - Show the entire file in a terse form<\/span><br \/>\n<span style=\"color: #ff0000;\"> dumpavail - Print an available file to stdout<\/span><br \/>\n<span style=\"color: #ff0000;\"> unmet - Show unmet dependencies<\/span><br \/>\n<span style=\"color: #ff0000;\"> search - Search the package list for a regex pattern<\/span><br \/>\n<span style=\"color: #ff0000;\"> show - Show a readable record for the package<\/span><br \/>\n<span style=\"color: #ff0000;\"> depends - Show raw dependency information for a package<\/span><br \/>\n<span style=\"color: #ff0000;\"> rdepends - Show reverse dependency information for a package<\/span><br \/>\n<span style=\"color: #ff0000;\"> pkgnames - List the names of all packages in the system<\/span><br \/>\n<span style=\"color: #ff0000;\"> dotty - Generate package graphs for GraphViz<\/span><br \/>\n<span style=\"color: #ff0000;\"> xvcg - Generate package graphs for xvcg<\/span><br \/>\n<span style=\"color: #ff0000;\"> policy - Show policy settings<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Options:<\/span><br \/>\n<span style=\"color: #ff0000;\"> -h This help text.<\/span><br \/>\n<span style=\"color: #ff0000;\"> -p=? The package cache.<\/span><br \/>\n<span style=\"color: #ff0000;\"> -s=? The source cache.<\/span><br \/>\n<span style=\"color: #ff0000;\"> -q Disable progress indicator.<\/span><br \/>\n<span style=\"color: #ff0000;\"> -i Show only important deps for the unmet command.<\/span><br \/>\n<span style=\"color: #ff0000;\"> -c=? Read this configuration file<\/span><br \/>\n<span style=\"color: #ff0000;\"> -o=? Set an arbitrary configuration option, eg -o dir::cache=\/tmp<\/span><br \/>\n<span style=\"color: #ff0000;\">See the apt-cache(8) and apt.conf(5) manual pages for more information.<\/span><\/p>\n<p>For example:<\/p>\n<p>stevee@raspberrypi ~ $ <span style=\"color: #0000ff;\">apt-cache showpkg ntop<\/span><br \/>\n<span style=\"color: #ff0000;\">Package: ntop<\/span><br \/>\n<span style=\"color: #ff0000;\">Versions:<\/span><br \/>\n<span style=\"color: #ff0000;\">3:4.99.3+ndpi5517+dfsg3-1 (\/var\/lib\/apt\/lists\/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages) (\/var\/lib\/dpkg\/status)<\/span><br \/>\n<span style=\"color: #ff0000;\"> Description Language:<\/span><br \/>\n<span style=\"color: #ff0000;\"> File: \/var\/lib\/apt\/lists\/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages<\/span><br \/>\n<span style=\"color: #ff0000;\"> MD5: 8d7e6637c6b740b203a76421995fd582<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Reverse Depends:<\/span><br \/>\n<span style=\"color: #ff0000;\"> ntop-dbg,ntop 3:4.99.3+ndpi5517+dfsg3-1<\/span><br \/>\n<span style=\"color: #ff0000;\"> ntop-data,ntop 3:4.0<\/span><br \/>\n<span style=\"color: #ff0000;\"> ntop-data,ntop 3:4.0<\/span><br \/>\n<span style=\"color: #ff0000;\"> ntop-data,ntop 3:4.99.3+ndpi5517+dfsg3-1<\/span><br \/>\n<span style=\"color: #ff0000;\"> harden-nids,ntop<\/span><br \/>\n<span style=\"color: #ff0000;\">Dependencies:<\/span><br \/>\n<span style=\"color: #ff0000;\">3:4.99.3+ndpi5517+dfsg3-1 - libc6 (2 2.13-28) libgcc1 (2 1:4.4.0) libgdbm3 (2 1.8.3) libgeoip1 (2 1.4.8+dfsg) libpcap0.8 (2 0.9.8) libpython2.7 (2 2.7) librrd4 (2 1.3.0) zlib1g (2 1:1.1.4) debconf (18 0.5) debconf-2.0 (0 (null)) ntop-data (5 3:4.99.3+ndpi5517+dfsg3-1) python-mako (0 (null)) net-tools (0 (null)) adduser (0 (null)) passwd (0 (null)) graphviz (0 (null)) gsfonts (0 (null))<\/span><br \/>\n<span style=\"color: #ff0000;\">Provides:<\/span><br \/>\n<span style=\"color: #ff0000;\">3:4.99.3+ndpi5517+dfsg3-1 -<\/span><br \/>\n<span style=\"color: #ff0000;\">Reverse Provides:<\/span><\/p>\n<p>or by using the \"--help\" switch appended to many commands to give a summarised list of switch options, in many cases:<\/p>\n<p>stevee@raspberrypi ~ $ <span style=\"color: #0000ff;\">htop --help<\/span><br \/>\n<span style=\"color: #ff0000;\">htop 1.0.1 - (C) 2004-2011 Hisham Muhammad<\/span><br \/>\n<span style=\"color: #ff0000;\">Released under the GNU GPL.<\/span><\/p>\n<p><span style=\"color: #ff0000;\">-C --no-color Use a monochrome color scheme<\/span><br \/>\n<span style=\"color: #ff0000;\">-d --delay=DELAY Set the delay between updates, in tenths of seconds<\/span><br \/>\n<span style=\"color: #ff0000;\">-h --help Print this help screen<\/span><br \/>\n<span style=\"color: #ff0000;\">-s --sort-key=COLUMN Sort by COLUMN (try --sort-key=help for a list)<\/span><br \/>\n<span style=\"color: #ff0000;\">-u --user=USERNAME Show only processes of a given user<\/span><br \/>\n<span style=\"color: #ff0000;\">-v --version Print version info<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Long options may be passed with a single dash.<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Press F1 inside htop for online help.<\/span><br \/>\n<span style=\"color: #ff0000;\">See 'man htop' for more information.<\/span><\/p>\n<p>So how many binaries are there and what are they?<\/p>\n<p>A list of programs can be output, sorted alphabetically and read page by page using the compgen -c command:<\/p>\n<p><span style=\"color: #0000ff;\">compgen -c | sort | less<\/span><\/p>\n<p><span style=\"color: #ff0000;\">:<\/span><br \/>\n<span style=\"color: #ff0000;\">!<\/span><br \/>\n<span style=\"color: #ff0000;\">.<\/span><br \/>\n<span style=\"color: #ff0000;\">[<\/span><br \/>\n<span style=\"color: #ff0000;\">[<\/span><br \/>\n<span style=\"color: #ff0000;\">[[<\/span><br \/>\n<span style=\"color: #ff0000;\">]]<\/span><br \/>\n<span style=\"color: #ff0000;\">{<\/span><br \/>\n<span style=\"color: #ff0000;\">}<\/span><br \/>\n<span style=\"color: #ff0000;\">2to3<\/span><br \/>\n<span style=\"color: #ff0000;\">2to3-2.7<\/span><br \/>\n<span style=\"color: #ff0000;\">2to3-3.2<\/span><br \/>\n<span style=\"color: #ff0000;\">411toppm<\/span><br \/>\n<span style=\"color: #ff0000;\">a2dismod<\/span><br \/>\n<span style=\"color: #ff0000;\">a2dissite<\/span><br \/>\n<span style=\"color: #ff0000;\">a2enmod<\/span><br \/>\n<span style=\"color: #ff0000;\">a2ensite<\/span><br \/>\n<span style=\"color: #ff0000;\">a2p<\/span><br \/>\n<span style=\"color: #ff0000;\">ab<\/span><br \/>\n<span style=\"color: #ff0000;\">accept<\/span><br \/>\n<span style=\"color: #ff0000;\">accessdb<\/span><br \/>\n<span style=\"color: #ff0000;\">aconnect<\/span><br \/>\n<span style=\"color: #ff0000;\">addftinfo<\/span><br \/>\n<span style=\"color: #ff0000;\">addgroup<\/span><br \/>\n<span style=\"color: #ff0000;\">addpart<\/span><br \/>\n<span style=\"color: #ff0000;\">addr2line<\/span><br \/>\n<span style=\"color: #ff0000;\">add-shell<\/span><br \/>\n<span style=\"color: #ff0000;\">adduser<\/span><\/p>\n<p>You could then try the man cmd against these to find what they do - if there is a man page written for it e.g.<\/p>\n<p><span style=\"color: #0000ff;\">man [<\/span><\/p>\n<p><span style=\"color: #ff0000;\">TEST(1) User Commands TEST(1)<\/span><\/p>\n<p><span style=\"color: #ff0000;\">NAME<\/span><br \/>\n<span style=\"color: #ff0000;\"> test - check file types and compare values<\/span><\/p>\n<p><span style=\"color: #ff0000;\">SYNOPSIS<\/span><br \/>\n<span style=\"color: #ff0000;\"> test EXPRESSION<\/span><br \/>\n<span style=\"color: #ff0000;\"> test<\/span><\/p>\n<p><span style=\"color: #ff0000;\">[ EXPRESSION ]<\/span><br \/>\n<span style=\"color: #ff0000;\"> [ ]<\/span><br \/>\n<span style=\"color: #ff0000;\"> [ OPTION.....<\/span><\/p>\n<p>To find how many there are, use the line listing of word count, wc:<\/p>\n<p>root@raspberrypi:\/home\/stevee# <span style=\"color: #0000ff;\">compgen -c | sort | wc -l<\/span><br \/>\n<span style=\"color: #ff0000;\">1922<\/span><\/p>\n<p>About\u00a02000 base function system type binary commands for this Linux flavour and release version.<\/p>\n<p>What about the packages available for this flavour? The can be listed from a-z using:<\/p>\n<p><span style=\"color: #0000ff;\">dpkg --list<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Desired=Unknown\/Install\/Remove\/Purge\/Hold<\/span><br \/>\n<span style=\"color: #ff0000;\">| Status=Not\/Inst\/Conf-files\/Unpacked\/halF-conf\/Half-inst\/trig-aWait\/Trig-pend<\/span><br \/>\n<span style=\"color: #ff0000;\">|\/ Err?=(none)\/Reinst-required (Status,Err: uppercase=bad)<\/span><br \/>\n<span style=\"color: #ff0000;\">||\/ Name Version Architecture Description<\/span><br \/>\n<span style=\"color: #ff0000;\">+++-=========-===========-============-====================<\/span><br \/>\n<span style=\"color: #ff0000;\">ii adduser 3.113+nmu3 all add and remove users and groups<\/span><br \/>\n<span style=\"color: #ff0000;\">ii alsa-base 1.0.25+3~deb7u1 all ALSA driver configuration files<\/span><br \/>\n<span style=\"color: #ff0000;\">ii alsa-utils 1.0.25-4 armhf Utilities for configuring and using ALSA...<\/span><\/p>\n<p>I assume the total packages installed so far must be:<\/p>\n<p>root@raspberrypi:\/home\/stevee# <span style=\"color: #0000ff;\">dpkg -l | wc -l<\/span><br \/>\n<span style=\"color: #ff0000;\">903<\/span><\/p>\n<p>Why? Well, the total packages available for this flavour is given by:<\/p>\n<p><span style=\"color: #0000ff;\">apt-cache -h<\/span><\/p>\n<p><span style=\"color: #ff0000;\">pkgnames - List the names of all packages in the system<\/span><\/p>\n<p><span style=\"color: #0000ff;\">apt-cache pkgnames<\/span><\/p>\n<p>This gives a scrolling list about 40,000 lines long, so may take some seconds, but counted with wc -l, gives:<\/p>\n<p>root@raspberrypi:\/home\/stevee# <span style=\"color: #0000ff;\">apt-cache pkgnames | wc -l<\/span><br \/>\n<span style=\"color: #ff0000;\">37503<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_978\" class=\"pvc_stats all  \" data-element-id=\"978\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>Linux has thousands of applications and programmes available to it, some are fundamental to its operation as part of the base system, and most are optional additions that can be added as required by the user. So how many are there and how can you find out what each does or what it depends on <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/linux-commands-packages-how-many-and-what-for\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Linux Commands + Packages &#8211; How Many, and What For?<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-978","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"a3_pvc":{"activated":true,"total_views":2,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=978"}],"version-history":[{"count":0,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/978\/revisions"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}