How do I check the ocaml documentation when offline?

I want to look up what ocaml built ins etc do without internet access. Is that possible?


I want to look yp what List.fold_left does.

I tried this but it didn’t work:

─( 10:50:13 )─< command 4 >─────────────────────────────────────────────────────────────────────────────────────────────{ counter: 0 }─
utop # List.fold_left
- : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a = <fun>
─( 10:50:21 )─< command 5 >─────────────────────────────────────────────────────────────────────────────────────────────{ counter: 0 }─
utop # help List.fold_left;;
Error: Unbound value help

If you installed the tooling with opam it should set up manual pages. Try running man List in the command line.


What does that mean? Does that mean in ocaml top or in the unix bash command line?

Regardless I tried it in utop and go this:

─( 10:53:25 )─< command 8 >─────────────────────────────────────────────────────────────────────────────────────────────{ counter: 0 }─
utop # man List;;
Error: Unbound value man

In the Unix bash command line.

How do I install the tooling with opam?

You might already have it. Try running opam --help on the Unix bash command line. If you don’t, you can follow the instructions here:

1 Like

@yawaramin Is there any way to read docs for installed libraries/packages, like Core?

Sure, see



Binary packages of opam are available for the stable, testing and unstable distributions, from the official repositories. You should be set with:

apt-get install opam