A lot of users have come across this issue where manual entries cannot be found for the commands. The errors are like the one shown below.
$ man chmod
No manual entry for chmod
See 'man 7 undocumented' for help when manual pages are not available.
This error occurs when the MANPATH for the manual entries go missing or have been replaced with something else. And this happens to users who already have manual files installed.
If you are a victim of this annoying error, try the following steps.
$ echo $MANPATH.
$ sudo vim /etc/environment
3. Add this to the file.
Explanation of the above steps
1. This is to check what the default manual path for Ubuntu is set to. By default it is blank. If the $MANPATH throws up any other path, then you need to add the path for the manual pages.
2. You can use gedit or nano . Command for gedit is
gksudo gedit /etc/environment
3. This is for setting the manual entry path. If you have any other path set in the MANPATH, then just add /usr/share/man in the file path. For example, if you have MANPATH already set like this
then you need to add the /usr/share/man at the end after adding a ‘:’ so that the final entry looks like this
Thats it. Enjoy your manuals.