Studying Linux commands and frustration

In other words

environment

ʻUbuntu 20.04 is obtained from the Microsoft Store, and after installation, sudo apt updateandsudo 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"

command

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).

package

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).

from now on

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 coreutils, bsdutils, and ʻutil-linux` packages.

Recommended Posts

Studying Linux commands and frustration
Linux commands
Linux commands
linux commands
Linux commands
Linux commands
Basic knowledge of Linux and basic commands
[Linux] File and directory operation commands
Note: Linux concepts and minimum commands
Linux (for users and su / sudo commands)
Network Linux commands
Verbalize Linux commands
Linux user commands
New Linux commands! !!
Basic LINUX commands
Various Linux commands
Typical Linux commands (7)
[Linux] Zip file compression and decompression commands [Vim]
OS and Linux distribution
Frequently used Linux commands
Frequently used Linux commands
Frequently used linux commands
[Linux] Group related commands
Linux commands to remember
New Linux commands! !! Part 2
Linux: files and directories
Beginners! Basic Linux commands and how to use them!
Explanation of package tools and commands for Linux OS
CLI and Linux basic terms
Linux (about files and directories)
Device and Linux file system
About LINUX files and processes
Recording and playback on Linux
Linux file and directory permissions
Organize [Django] commands and roles
Commands and files to check the version of CentOS Linux
Introduction to Linux Commands ~ LS-DYNA Edition ~
Differences between Windows and Linux directories
Differences between yum commands and APT commands
Are macOS and Linux completely different?
Linux Frequently Used Commands [Personal Memo]
(Windows10) Install Linux environment and gnuplot.
[linux] Swap Caps Lock and Ctrl
Handle dates in Linux bash commands
Permission and ownership change command [Linux]
Linux archiving and compression (tar and gzip)
[Linux Mint 20] Various WiFi confirmation commands
[Linux] Frequently used Linux commands (file operation)
Convenient shortcut keys for Linux commands! !! !!
Frequently used Linux commands (for beginners)
Linux commands that you often forget
List of frequently used Linux commands
Try compiling Linux commands (cross-compilation practice)
Linux commands related to character code
[Linux] Frequently used Linux commands (folder operation)
About Linux commands Super basic edition
Use Linux commands on Android devices