Rust doc isn't working in the Ubuntu terminal

For some reason rustup doc isn't working in wsl ubuntu terminal whilst same is working in the powershell.

It isn't showing any error either.

Just like in the image.

rustup

Is there any additional packages do I need to install?

I've tried running the command rustup component add rust-docs

But it is showing that the latest version already have been installed.

If you don't have a browser installed inside wsl, trying to open the docs inside a browser will fail. xdg-open (which is probably used by rustup to open the browser) will show a popup if there is no application that can handle a protocol, but you need a graphical interface to see said popup in the first place. As alternative you can go to std - Rust inside the browser you installed on your windows machine to see the online version.

Thanks for clearing the doubt.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.