The only Linux command you need to know

The only Linux command you need to know is apropos (pronounced app pro po) Yes, it rhymes.
ap·ro·pos
          Listen to the pronunciation of 1apropos

Pronunciation: \ˌa-prə-ˈpō, ˈa-prə-ˌ\
Function: adverb
Etymology: French à propos, literally, to the purpose
Date: 1668

apropos means being both relevant and opportune and is the only linux command you need to know when trying to figure out what Linux command you are looking for.
Some of you might be arguing what about man? Yes, man is a very important command for learning linux commands but man will not tell you which commands list files or what command to use to create directories. We have to know those commands exist. Sure we can look in bin or whatever, but we don't know how to do anything yet including how to change directories or list directory contents. Wow, how did we even find the terminal?

ok, so let's figure out how to read manual pages

apropos manual
abc2ly (1)           - manual page for abc2ly (LilyPond) 2.10.33
apropos (1)          - search the manual page names and descriptions
ark (1)              - manual page for Ark
catman (8)           - create or update the pre-formatted manual pages
convert-ly (1)       - manual page for convert-ly 2.10.33
etf2ly (1)           - manual page for etf2ly (LilyPond) 2.10.33
grub-reboot (8)      - manual page for grub-reboot 0.01
lilypond (1)         - manual page for LilyPond 2.10.33
lilypond-book (1)    - manual page for lilypond-book 2.10.33
lilypond-invoke-editor (1) - manual page for lilypond-invoke-editor 2.10.33
man (1)              - an interface to the on-line reference manuals
manconv (1)          - convert manual page from one encoding to another
mandb (8)            - create or update the manual page index caches
manpath (1)          - determine search path for manual pages
midi2ly (1)          - manual page for midi2ly (LilyPond) 2.10.33
missing (7)          - missing manual pages
musicxml2ly (1)      - manual page for musicxml2ly (LilyPond) 2.10.33
readahead-list (8)   - manual page for readahead-list: 0.20050517.0220
readahead-watch (8)  - manual page for readahead-watch: 0.20050517.0220
w3mman (1)           - an interface to the on-line reference manuals by w3m(1)
whatis (1)           - display manual page descriptions
whereis (1)          - locate the binary, source, and manual page files for a command
xman (1)             - Manual page display program for the X Window System

Cool, I didn't even know about xman
Ok, so that turned up a lot of results. The numbers represent the manual section so (1) which is User Commands is likely more what we are looking for than (7) or (8) but we don't know how to filter yet!
We do know about man now however so

man apropos

NAME
apropos - search the manual page names and descriptions

SYNOPSIS
apropos [-dalhV] [-e|-w|-r] [-s section] [-m system[,...]]
[-M path] [-L locale] [-C file] keyword ...

DESCRIPTION
Each manual page has a short description available within it.
apropos searches the descriptions for instances of keyword.

keyword is usually a regular expression, as if (-r) was used,
or may contain wildcards (-w), or match the exact keyword (-e).
Using these options, it may be necessary to quote the keyword
or escape (\) the special characters to stop the shell from
interpreting them.

The standard matching rules allow matches to be made against
the page name and word boundaries in the description.

The database searched by apropos is updated by the mandb program.
Depending on your installation,
this may be run by a periodic cron job, or may need to be run
manually after new manual pages have been installed.

This is quite long so I have just included the header.
In the OPTIONS we learn that we can search particular sections or paths as well as use wild cards and boolean operators.

Now we could find that manual even faster by looking only in system commands

apropos manual --section 1
abc2ly (1)           - manual page for abc2ly (LilyPond) 2.10.33
apropos (1)          - search the manual page names and descriptions
ark (1)              - manual page for Ark
convert-ly (1)       - manual page for convert-ly 2.10.33
etf2ly (1)           - manual page for etf2ly (LilyPond) 2.10.33
lilypond (1)         - manual page for LilyPond 2.10.33
lilypond-book (1)    - manual page for lilypond-book 2.10.33
lilypond-invoke-editor (1) - manual page for lilypond-invoke-editor 2.10.33
man (1)              - an interface to the on-line reference manuals
manconv (1)          - convert manual page from one encoding to another
manpath (1)          - determine search path for manual pages
midi2ly (1)          - manual page for midi2ly (LilyPond) 2.10.33
musicxml2ly (1)      - manual page for musicxml2ly (LilyPond) 2.10.33
w3mman (1)           - an interface to the on-line reference manuals by w3m(1)
whatis (1)           - display manual page descriptions
whereis (1)          - locate the binary, source, and manual page files for a command
xman (1)             - Manual page display program for the X Window System

Or by searching for multiple words

apropos --and reference manual
man (1)              - an interface to the on-line reference manuals
w3mman (1)           - an interface to the on-line reference manuals by w3m(1)

sweet, but what if we just wanted to filter a long list of stuff? That might be another usefull way to cut the fat from our apropos results

apropos --and match pattern
egrep (1) - print lines matching a pattern
fgrep (1) - print lines matching a pattern
git-grep (1) - Print lines matching a pattern
grep (1) - print lines matching a pattern
msggrep (1) - pattern matching on message catalog
rgrep (1) - print lines matching a pattern
XML::PatAct::MatchName (3pm) - A pattern module for matching element names
zipgrep (1) - search files in a ZIP archive for lines matching a pattern

Ok, so this returned a lot of grep thingys, so grep must be the thing we are looking for. It is also the 4th item down in the list, so we man grep and learn how to use it.

apropos --and match pattern | grep ^gr
grep (1)             - print lines matching a pattern

Ok, so I cheated there a tiny bit because the manual page for grep doesn't really tell us much about piping STDIN and STDOUT. It does mention it so a curious soul might google it and learn all about STDIN, STDOUT, MKFIFO and other juicy tidbits. The point being that we knew nothing and now if we want to find a command to tell us about our hardware we just say

apropos --and list hardware
lshw (1)             - list hardware

or we want to figure out how to configure a network interface

apropos --and configure network
ifconfig (8)         - configure a network interface
iwconfig (8)         - configure a wireless network interface
iwpriv (8)           - configure optionals (private) parameters of a wireless network interface

or archive a file

apropos archive
7z (1)               - A file archiver with highest compression ratio
7za (1)              - A file archiver with highest compression ratio
apt-ftparchive (1)   - Utility to generate index files
apt-secure (8)       - Archive authentication support for APT
ar (1)               - create, modify, and extract from archives
cabextract (1)       - program to extract files from Microsoft cabinet (.cab) archives
cpio (1)             - copy files to and from archives
deb-override (5)     - Debian archive override file
dh_make (8)          - Debianize a regular source archive
dpkg-deb (1)         - Debian package archive (.deb) manipulation tool
dpkg-split (1)       - Debian package archive split/join tool
funzip (1)           - filter for extracting from a ZIP archive in a pipe
git-archive (1)      - Create an archive of files from a named tree
git-bundle (1)       - Move objects and refs by archive
git-get-tar-commit-id (1) - Extract commit ID from an archive created using git-archive
git-index-pack (1)   - Build pack index file for an existing packed archive
git-pack-objects (1) - Create a packed archive of objects
git-show-index (1)   - Show packed archive index
git-tar-tree (1)     - Create a tar archive of the files in the named tree object
git-unpack-objects (1) - Unpack objects from a packed archive
git-upload-archive (1) - Send archive back to git-archive
git-verify-pack (1)  - Validate packed git archive files
gitunpack (1)        - GNU Interactive Tools - Unified archive unpacking
libarchive-formats (5) - archive formats supported by the libarchive library
ranlib (1)           - generate index to archive.
rpm2cpio (8)         - Extract cpio archive from RPM Package Manager (RPM) package.
tar (5)              - format of tape archive files
unzip (1)            - list, test and extract compressed files in a ZIP archive
unzipsfx (1)         - self-extracting stub for prepending to ZIP archives
zip (1)              - package and compress (archive) files
zipcloak (1)         - package and compress (archive) files
zipgrep (1)          - search files in a ZIP archive for lines matching a pattern
zipinfo (1)          - list detailed information about a ZIP archive
zipnote (1)          - package and compress (archive) files
zipsplit (1)         - package and compress (archive) files

So starting from nothing, apropos allows us to find commands we are looking for including help and man which allow us to learn how to use the various commands we found.
Which is why I argue that apropos is the only command you need to know.

Well, at first anyway.
But then you should really learn man, grep, ls, mv, cp, mkdir, chown, chmod, tar, gzip, top, ps, kill, killall, adduser, addgroup, tail, less, screen, vim, wget, ftp (your systems package manager like dpkg, apt or yum). And there you have it, the 20+ linux commands you need to know. I was going to put nice descriptions for each, but since now you know how to RTFM, I wouldn't want to spoil all of your fun.

 

 

 

 

 

 


Warning: Table './regx_drupal/accesslog' is marked as crashed and should be repaired query: INSERT INTO accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values('', 'node/154', '', '44.200.40.195', 0, 'atbltlq15ktbrb5glkdqn1kk55', 0, 1656387664) in /home/regx/public_html/html/includes/database.mysql.inc on line 174