How to Install NetBeans on Ubuntu 20.04

NetBeans is an open-source IDE (Integrated Development Environment) is a very powerful software development tool, mostly used to develop Java and C/C++ applications.

NetBeans is also referred to as a platform of modular components used for developing Desktop, Web, and Mobile applications.

Using various extensions or plugins, you can add support for other programming languages such as C, C++, HTML, PHP, JavaScript, JSP, Ajax, Ruby on Rails, etc.

It supports several features like other IDEs including error checking, code completion, built-in debugging support, syntax highlighting, etc.

The platform runs on a modular architecture with a vast set of tools and features for an entire software development cycle, from the inception of an idea to app deployment. Because of that, it can be utilized on Windows, Linux, OS X and other UNIX based operating systems.

It is also the official Java 8 IDE that is packed with powerful converters, editors, and code analyzers. The system integrates with the widely used FindBugs tool that enables users to quickly identify and solve common code problems.

User’s Review on Netbeans IDE: It is very easy to use and can be used by both expert professional programmers as well as someone who is a novice in the programming world.

NetBeans is designed to offer a smart and fast way for developers to code. The application provides robust code analyzers, converters, and editors that display support for the latest Java technologies.

The features allow developers to quickly and effortlessly upgrade applications to use the cutting-edge Java 8 language constructs.

Key Features of NetBeans IDE:

  • Cross-platform support
  • Multiple language support
  • Visual debugger
  • NetBeans Profiler
  • Static analysis tools
  • Project management
  • Code editor
  • Batch code analyzers

Important Technical details:

  • Devices Supported: Windows, Linux, Mac
  • Language Support: English, Chinese, Japanese, Russian
  • Pricing Model: Free

Advantages and Disadvantages

Every application has some advantages and disadvantages. Here we have listed our observations on NetBeans.


  • Free and open source
  • Easy to use for beginners
  • Code completion
  • Support for a lot of plugins and frameworks
  • Support Cross Platform
  • Find and replace
  • Integrating with GitHub is easy and painless
  • Error detection and debugging
  • Many customizable key board shortcuts
  • Strong Maven Support
  • MySQL support
  • Collaboration
  • Extensible


  • Takes a lot of time to start
  • Consumes more memory space as compared to other IDEs specially While working on big projects.
  • Outdated framework support.
  • Debugger is really slow as compared to IntelliJ & Eclipse.
  • Lacks Support for Modeling

This article explains two methods of installing NetBeans IDE on Ubuntu 20.04.

Choose the installation method that is most appropriate for your environment.


NetBeans IDE is a Java-based application and requires Java 8 or later Java Development Kit(JDK) to be installed on your system.

Type the following command to update the package index and then install the Java package.

$ sudo apt update && sudo apt install default-jdk

Once completed the installation, verify the installation of Java JDK and check the installed version by running the below-mentioned command.

$ java -version

Method 1: Installing NetBeans as a Snap Package

A snap package is a type of universal Linux package that you can enjoy irrespective of the distro. Its an self-contained software packages that include the binary all dependencies needed to run the application.

All you need is the snap service pre-configured, In the case of Ubuntu 20.04, it comes with snap pre-installed.

If snapd package is not already installed then you can install it by running following command.

$ sudo apt install snapd

Note: Snap packages can be installed from either the command-line or via the Ubuntu Software application.

This is actually the Snap version of the NetBeans. It can be used on any Linux distribution that has Snap support.

Open your terminal (Ctrl+Alt+T) and type the following command to install the NetBeans IDE package.

$ sudo snap install netbeans --classic

On successfull installation, you will get the following output.

netbeans 11.3 from Apache NetBeans* installed

That’s It. Now you can open the NetBeans application with the help of Activities search bar.

If you are not comfortable with the command line, open Ubuntu Software, search for “NetBeans” and install the application.

Method 2: Installing NetBeans IDE from Source

Compiling NetBeans from the source allows you to install the latest NetBeans version. Follow the following steps to install netbeans using the source code method.

Step #1

Open a terminal (CTRL+ALT+T) and execute the below commands to update packages.

$ sudo apt update && sudo apt upgrade

Step #2

Download the latest NetBeans source code package from the official website. You can do so using wget Command.

$ sudo wget

Step #3

Once the download is complete extract the .zip file with the help of unzip command.

$ unzip

List the created directory content for verification as follows.

$ ls netbeans

Step #4

Type the following command to move the netbeans directory to /opt.

$ sudo mv netbeans/ /opt/

The executable netbeans binary is located at the ‘/opt/netbeans/bin/netbeans’ path.

So, adjust the $PATH environment variable for the NetBeans files. Open the ‘~/.bashrc’ file in any source code editor tool.

$ sudo nano ~/.bashrc

Paste the given path at the end of the file as follows.

export PATH="$PATH:/opt/netbeans/bin/"

Now type the following command to source the file.

$ source ~/.bashrc

Step #5

Now, create the desktop launcher for NetBeans IDE. For that purpose, you will create a file at the given location by typing the following command as follows.

$ sudo nano /usr/share/applications/netbeans.desktop

Paste the following lines inside the file:

[Desktop Entry]
Name=Netbeans IDE
Comment=Netbeans IDE

Save the above configuration and close the file. That’s It, Now you can use NetBeans on your system.

Starting NetBeans IDE

In the Activities search bar type “NetBeans” and click on the icon to launch the application.

OR You can start the IDE by typing netbeans in your terminal.

Netbeans IDE Welcome Page:


I hope that now you have a good understanding of How to Install NetBeans on Ubuntu 20.04 LTS Focal Fossa.

If anyone does have any questions about what we covered in this guide then feel free to ask in the comment section below and I will do my best to answer those.

Leave a Comment