Shell commands and output for jupyter notebook


I am currently creating a robotics course on The Construct, and I am facing an issue in the Jupyter Notebook formatting.

My course (Jupyter notebook) includes a lot of bash shell commands (as well as generated output). I would like to put it in a form that it cannot confuse the student.

So far I put everything in between the triple quotes but I noticed that some courses had a nicer syntax.

From the Linux for robotics course, I could see this:

I looked for Markdown and HTML ways to do so (the “Execute in Shell” as well as the “Shell output”) but couldn’t find a way.

How can I reproduce such syntax in my Rosject?

Bonus question: How can I have numbered headers like in the Linux for robotics course? Is it possible to get access to the source of the Jupyter notebook of other courses to figure out how certain syntax were made?


  1. While editing the cell, change the type from Markdown to Code to have the “In ” cells with code

Those while made with html inside markdown cells. You can use your browser to inspect the html on the page to find out its source code.

These are also done with html, just because of color and alignment (center). You can also use markdown’s # to indicate a header cell.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.