Learn how to enable the syntax highlighting of shell scripts (.sh files) in NetBeans.

How to enable the syntax highlighting for shell scripts in Apache NetBeans

In this tutorial, we will show you how to install an extra plugin to add the syntax highlighting of Shell Scripts in NetBeans.

1. Download NBShell Plugin

As first step you need to download the NBShell plugin from the official NetBeans website here. Click on the download button and a file, namely 1476706155_nbshell-1.2.3.nbm will be download in your browser, this file is the Plugin that can be installed through the Plugin Installer of NetBeans, once you have the file keep its path in mind as you will need to indicate its location in NetBeans for its installation.

2. Installing Plugin

As next, open the Plugin Manager through Tools > Plugins:

NetBeans Plugin Manager How to Open

This will open the helper that allows you to install custom plugins. Then, open the Downloaded Tab and click on Add Plugins ...:

NetBeans Plugin Manager

When you click on Add Plugins a new file dialog selector will appear, here you need to search for the previously downloaded file and select it, then click on open:

NetBeans Add Plugin Dialog

After selecting the file, the plugin will be added to NetBeans, however it isn't installed nor active, so you will need to select it from the list and click on Install:

NBShell Install Plugin NetBeans

Follow the installation, restart NetBeans and the plugin will now be able to be used, so everytime you open a .sh (shell script), its code will be highlighted on your favorite IDE.

Happy coding ❤️!


Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Sponsors