Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    $ apropos space
    CORE (3perl)         - Namespace for Perl's core routines
    arpd (8)             - userspace arp daemon.
    CMSG_SPACE (3)       - access ancillary data
    CUDA_ERROR_INVALID_ADDRESS_SPACE (3) - (unknown subject)
    cudaErrorInvalidAddressSpace (3) - (unknown subject)
    df (1)               - report file system disk space usage


Thank you, you just re-enforced my point; I've been using Linux seriously for about a year now, and I didn't know about 'apropos'. Bash never mentioned it whenever I got stuck, and my learning travels on the internet has never referenced it.


Hah, I've been using Unix-based OSes in a professional capacity for over 15 years and I've never heard of apropos. :)


There is also `man -k`. -k of course is short for "apropos". It's all very logical and intuitive.

(Seriously though, reading the manpage for man is where I first learned about apropos.)


Honestly google is a better tool unless you already kind of know what you're looking for.

Google "linux how much space on drive" and the first hit tells you exactly what you need.

Another question someone might ask is "how do I change my password". Google for "linux change password" and there is a special help box right at the top of the search results.

apropos password and you get this enormous list:

  apg (1)              - generates several random passwords
  chage (1)            - change user password expiry information
  chgpasswd (8)        - update group passwords in batch mode
  chpasswd (8)         - update passwords in batch mode
  cpgr (8)             - copy with locking the given file to the password or gr...
  cppw (8)             - copy with locking the given file to the password or gr...
  cracklib-check (8)   - Check passwords using libcrack2
  create-cracklib-dict (8) - Check passwords using libcrack2
  crypt (3)            - password and data encryption
  crypt_r (3)          - password and data encryption
  des_read_2passwords (3ssl) - Compatibility user interface functions
  des_read_password (3ssl) - Compatibility user interface functions
  doveadm-pw (1)       - Dovecot's password hash generator
  endpwent (3)         - get password file entry
  endspent (3)         - get shadow password file entry
  EVP_BytesToKey (3ssl) - password based encryption routine
  expiry (1)           - check and enforce password expiration policy
  fgetpwent (3)        - get password file entry
  fgetspent (3)        - get shadow password file entry
  fgetspent_r (3)      - get shadow password file entry
  getpass (3)          - get a password
  getpw (3)            - reconstruct password line entry
  getpwent (3)         - get password file entry
  getpwnam (3)         - get password file entry
  getpwnam_r (3)       - get password file entry
  getpwuid (3)         - get password file entry
  getpwuid_r (3)       - get password file entry
  getspent (3)         - get shadow password file entry
  getspent_r (3)       - get shadow password file entry
  getspnam (3)         - get shadow password file entry
  getspnam_r (3)       - get shadow password file entry
  git-credential-cache (1) - Helper to temporarily store passwords in memory
  gitcredentials (7)   - providing usernames and passwords to Git
  grpconv (8)          - convert to and from shadow passwords and groups
  grpunconv (8)        - convert to and from shadow passwords and groups
  grub-mkpasswd-pbkdf2 (1) - generate hashed password for GRUB
  lckpwdf (3)          - get shadow password file entry
  login.defs (5)       - shadow password suite configuration
  lppasswd (1)         - add, change, or delete digest passwords.
  Net::LDAP::Control::PasswordPolicy (3pm) - LDAPv3 Password Policy control object
  Net::LDAP::Extension::SetPassword (3pm) - LDAPv3 Modify Password extension ob...
  pam_pwhistory (8)    - PAM module to remember last passwords
  pam_unix (8)         - Module for traditional password authentication
  passwd (1)           - change user password
  passwd (1ssl)        - compute password hashes
  passwd (5)           - the password file
  passwd2des (3)       - RFS password encryption
  putpwent (3)         - write a password file entry
  putspent (3)         - get shadow password file entry
  pwck (8)             - verify integrity of password files
  pwconv (8)           - convert to and from shadow passwords and groups
  pwunconv (8)         - convert to and from shadow passwords and groups
  seahorse (1)         - Passwords and Keys
  setpwent (3)         - get password file entry
  setspent (3)         - get shadow password file entry
  sgetspent (3)        - get shadow password file entry
  sgetspent_r (3)      - get shadow password file entry
  shadow (5)           - shadowed password file
  shadowconfig (8)     - toggle shadow passwords on and off
  smbpasswd (5)        - The Samba encrypted password file
  smbpasswd (8)        - change a user's SMB password
  ulckpwdf (3)         - get shadow password file entry
  unix_chkpwd (8)      - Helper binary that verifies the password of the curren...
  unix_update (8)      - Helper binary that updates the password of a given user
  vigr (8)             - edit the password, group, shadow-password or shadow-gr...
  vipw (8)             - edit the password, group, shadow-password or shadow-gr...
  xcrypt (3)           - RFS password encryption
  xdecrypt (3)         - RFS password encryption
  xencrypt (3)         - RFS password encryption
If you didn't already know you were looking for the "passwd" command it might be hard to pick it out of the list.


    $ apropos -a change password
    chage (1)            - change user password expiry information
    kpasswd (1)          - change a user's Kerberos password
    passwd (1)           - change user password
    PKCS12_newpass (3ssl) - change the password of a PKCS12 structure

    $ apropos -a space disk
    df (1)               - report file system disk space usage
    df (1p)              - report free disk space


The fact that the search defaults to "or" instead of "and" is a design flaw IMHO. By far the most common case when you have multiple arguments is that you want the item that contains all of the keywords.


Filter it by section...

man -k -S1 password


Nothing says user friendly like making the user read the manual for his manual so he can memorize the nine different categories (plus perhaps custom categores like TCLs) to get the manual page he wants.

I use man and apropos all of the time, but I have no illusion that they're new user friendly. They're amazing when you just need to look up some options or get the syntax for a system call, but if you've not assimilated the Unix way of thinking they're quite obtuse.


This example would be a lot less ironically-unhelpful if 'apropos' were renamed 'help'.


The name “help” is, unfortunately, already taken by a shell built-in command. But one could argue that this help command should be very much more helpful than the restricted functionality it currently implements.


I think people would complain that apropos doesn't do its job if it were named help.

Apropos would be a powerful part of a "help" command, but in 50 years nobody has ever written a help command that gained enough traction to be included in the standard toolchain.


Request granted!

Apropos doesn’t do it’s job because it isn’t named — or integrated with — help.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: