We will see in this article how to install the Reveal.js HTML presentation framework on Ubuntu 20.04 LTS system.
To install the required dependencies or packages, use sudo access or log in as root user on the Ubuntu system.
Installation steps to install Reveal.js on Ubuntu 20.04
By following the below-given steps, the Reveal.js framework can easily install on Ubuntu 20.04 LTS system.
Step 1: Install required dependencies
Some packages are required to install on the Ubuntu system, before starting the installation of Reveal.js. The node.js package is a prerequisite for installing the reveal.js. The node.js package is not present in the Ubuntu 20.04 default repository. Therefore, you need to include the updated node.js repository in your Ubuntu system. So, launch the command-line terminal window by pressing the keyboard shortcut keys ‘Ctrl+Alt+t’. Now, by executing the below-given command install the required packages:
$ sudo apt install curl gnupg2 unzip git
Next, include the Node.js repository in your Ubuntu 20.04 system by typing the following command:
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
Once the node.js repository is included, type the following command to install the node.js on Ubuntu 20.04 system:
$ sudo apt install nodejs
After installing the node.js package, check the node.js installed version by executing the following command:
$ node -v
Step 2: Download and install Reveal.js on Ubuntu 20.04
Download the Reveal.js from the Github repository. Clone the Reveal.js repository using git.
$ git clone https://github.com/hakimel/reveal.js.git
Navigate into the reveal.js directory that is created during the cloning and now install the required packages.
$ cd reveal.js
$ sudo npm install
Once all dependencies for the reveal.js is installed, start the application by running the below-mentioned command:
$ npm start
After running the above command, the following result shows on the terminal window:
The above output shows that the reveal service is running at the default port 8000. This port number can change while the application starts.
$ npm start -- --port=8002
Now, create the systemd unit service to manage the service of reveal. So, create and open the file using any available text editor as follows:
$ sudo nano /lib/systemd/system/reveal.service
Paste the following lines in this file:
[Service] Type=simple User=root Restart=on-failure WorkingDirectory=/home/khuzdar/reveal.js ExecStart=npm start
Change the working directory path based on your system requirements. Here, the path of the directory is given as ‘WrokingDirectory=/home/kbuzdar/reveal.js’. Close the above file after saving changes.
Now, running the below-mentioned command to reload, start, and enable the reveal service:
$ sudo systemctl daemon-reload $ sudo systemctl start reveal $ sudo systemctl enable reveal
Type the following command to view the current running status of the reveal service:
$ sudo systemctl status reveal
Step 3: Access the web interface of Reveal.js
Reveal.js service is running on this system. Now, launch the web interface of the reveal.js framework. Open the web browser ‘Mozilla Firefox’ or any other on your system. Enter the below-given URL with your server IP address in the address bar:
The following default reveal.js web interface shows in your browser that the installation of reveal.js is completed now.
We installed the Reveal.js HTML presentation framework on Ubuntu 20.04 system in this article. Today, with growing IT industry development, this tool is very useful for most people. Install reveal.js on your system and enjoy the usefulness of this tool. Thanks!