Find the answer to your Linux question:
Results 1 to 7 of 7
Does anyone know how I can change the man page for a program? I recently installed ash linked it to /bin/sh (default was bash). When I run 'man sh', I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319

    Man pages


    Does anyone know how I can change the man page for a program? I recently installed ash linked it to /bin/sh (default was bash). When I run 'man sh', I get the bash man page instead of the ash man page. I'm thinking that I can fix this by setting the appropriate path somewhere.
    The best things in life are free.

  2. #2
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Have you tried man ash? Changing a symlink should not change the man pages.

  3. #3
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Yes, that works (man ash) fine however, I'd like to know the mechanics behind it. I'm guessing that the man pages are registered somewhere. Because /bin/sh was originally linked to /bin/bash, I believe this is why the man page for sh defaults to the bash man page. I'd like to change this.
    The best things in life are free.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That's not it, though. man just looks up the man files in the different man directories, such as /usr/share/man/man?. Probably, your /usr/share/man/man1/sh.1.gz is symlinked to bash.1.gz. To check out the man config, see /etc/man.config.

  5. #5
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Quote Originally Posted by Dolda2000
    That's not it, though
    I'm not too sure about what you don't agree on but you were thinking the exact same thing that I was. I just didn't know how to edit the links since I didn't know which the man pages resides in. Guess I should have ran 'man man'.
    By the way, is this the only thing that I need to change? Originally, /bin/sh was pointing at /bin/bash. I changed it so that it points at /bin/ash.
    The best things in life are free.

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    What I was referring to was the /bin/sh symlink. Maybe I should have clarified that...
    Anyway, the /bin/sh symlink isn't the slightest bit relevant here. man doesn't look at it at all. The files/symlinks in the mandirs is all it looks at.

  7. #7
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Yes, I'm aware that the link between /bin/sh and the man page for it are two separate things. You cleared pointed that out and I'm glad that the problem is now resolved. As always, thanks for your help.
    The best things in life are free.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •