is obtained from the Microsoft Store, and after installation, sudo apt update
andsudo apt upgrade` have been performed, and the environment on WSL2.
> cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
First, I counted the number of commands (executable files) in the path. (There seems to be different binaries with the same name, but for the time being the same count)
> echo $PATH | sed "s/:/\n/g" | grep -v "^\/mnt" | while read d; do ls -1 "$d"; done | sort | uniq | wc -l 1339
1339 ,, I decided to give up grasping all the commands because it would take several years to remember one command I didn't know each day (Frustration 1).
Even if you give up on the command, you still want to know what packages are installed.
> apt list --installed | wc -l 608
608!?. Unreasonable (frustration 2). Therefore, I thought that the packages referenced by various packages would be of high importance because of the package dependencies, so I roughly counted the reverse dependencies of the packages and looked at the ranking.
> apt list --installed | sed "s:\/.*::" | while read p; do n=`apt-cache rdepends "$p" | wc -l`; echo -e "$n\t$p"; done | sort -rn -k1 | head 22107 libc6 6633 libstdc++6 5683 libgcc-s1 4427 perl 3140 libglib2.0-0 2508 zlib1g 2126 python3 1956 libgmp10 1596 libx11-6 1198 dpkg
Libc6 was the top, but when I checked the files extracted by the package with
dpkg-query -L libc6, there were only static objects expanded in the lib directory, and there were no bin-related directories. In the first place, many packages starting with
lib do not seem to be expanded to the bin directory (excluding
libc-bin, libpam-modules-bin, libglib2.0-bin, libcap2-bin, libperl5.30, libpam-runtime). .. Now, let's start with the
perl package at the top of the ranking.
> dpkg-query -L perl | grep "bin" /usr/bin /usr/bin/corelist /usr/bin/cpan /usr/bin/enc2xs /usr/bin/encguess /usr/bin/h2ph /usr/bin/h2xs /usr/bin/instmodsh /usr/bin/json_pp /usr/bin/libnetcfg /usr/bin/perlbug /usr/bin/perldoc /usr/bin/perlivp /usr/bin/perlthanks /usr/bin/piconv /usr/bin/pl2pm /usr/bin/pod2html /usr/bin/pod2man /usr/bin/pod2text /usr/bin/pod2usage /usr/bin/podchecker /usr/bin/podselect /usr/bin/prove /usr/bin/ptar /usr/bin/ptardiff /usr/bin/ptargrep /usr/bin/shasum /usr/bin/splain /usr/bin/xsubpp /usr/bin/zipdetails
There are many things I have never seen. I decided to reconsider that it would be okay to learn when it was needed (frustration 3).
Maybe I should have done it with a little more minimal install. In the first place, I lost track of what I was aiming for.
I think it would be better to start by learning the commands contained in the
bsdutils, and ʻutil-linux` packages.