DEV Community

Discussion on: Install Fedora 37 or earlier on Windows Subsystem for Linux (WSL)

Collapse
 
martinhinze profile image
martin-hinze

I missed having man pages available with this container version of Fedora. Thus, I would like to share how I added man pages to my WSL Fedora system, in case this might be of use to someone else out there.

@bowmanjd : Feel free to include this in your article, if you like, or point out enhancements or how to do it better.

Basically, I told dnf to include man pages when installing packages and then reinstalled all packages already installed.

If you don't have a text editor installed, which you know how to use, run

sudo dnf install nano -y
Enter fullscreen mode Exit fullscreen mode

to install the easy-to-use editor GNU nano.

Delete the line tsflags=nodocs in the file /etc/dnf/dnf.conf with a text editor of your choice and save it, e.g.

sudo nano /etc/dnf/dnf.conf
Enter fullscreen mode Exit fullscreen mode

Update your system and install the man command:

sudo dnf update -y
sudo dnf install man man-pages -y
Enter fullscreen mode Exit fullscreen mode

In your home directory, create a text file reinstall-all-dnf-packages.sh containing the following script:

#!/bin/bash

installedPkgs=$(dnf list installed | tail -n +2 | cut -d ' ' -f 1)
for pkg in $installedPkgs; do
    dnf reinstall $pkg -q -y
done
Enter fullscreen mode Exit fullscreen mode

Make the script runable and run it:

chmod 755 reinstall-all-dnf-packages.sh
./reinstall-all-dnf-packages.sh
Enter fullscreen mode Exit fullscreen mode

Now all man pages should be available. Try, for example, man dnf. :-)

Collapse
 
bowmanjd profile image
Jonathan Bowman

Thanks, again, @martinhinze ! I have now included your good advice in the article. Much appreciated!