How to Install NetBeans on Linux


Apache NetBeans is an open-source IDE that lets you create desktop, mobile, and web applications in various programming languages such as C, C++, Java, PHP, etc. It is a popular choice of IDE for developers around the world due to its versatility, ease of use, and range of features.

NetBeans is available for Windows, Linux, and macOS. Let’s look at some of the features of NetBeans and ways to install it on Linux.

Features of NetBeans

NetBeans provides a wide range of features to help developers write and debug code. Some of its features are listed below:

  • Lightweight text editor
  • Syntax highlighting
  • Smart code complete
  • Syntax error detection
  • A debugger to help spot and fix errors in your code
  • Integrated version control

There are various ways to install NetBeans on Linux. Let’s explore them one by one.

Install NetBeans Through dpkg on Debian/Ubuntu

On Debian-based distributions such as Ubuntu and Linux Mint, you can install NetBeans via dpkg. This method is very simple and requires few commands in the terminal. You can open the terminal using Ctrl + Alt + T or from the applications menu.

NetBeans requires JDK (Java Development Kit) to be installed on your system. To install JDK on Debian-based distributions, run the following command in the terminal:

 sudo apt install -y openjdk-11-jdk 

To verify the installation of JDK, run the following command:

 java -version 

If JDK is installed, the command will return the version in the output.

Now run the following command to download the NetBeans DEB package:

 wget https: 

Then to install the NetBeans DEB package, run the following command:

 sudo dpkg -i apache-netbeans_*_amd64.deb 

Once the installation is complete, you can launch NetBeans from the applications menu or by just typing netbeans in the terminal.

Uninstall NetBeans on Debian/Ubuntu

You can easily uninstall an application via APT if you no longer need it. To uninstall NetBeans, use:

 sudo apt remove netbeans 

To remove the NetBeans DEB package as well, use the rm command followed by the package name:

 sudo rm apache-netbeans_*_amd64.deb 

Make sure you’re in the directory where you downloaded the file.

Installing NetBeans Through the Installer Script (for All Linux Distributions)

You can also install NetBeans on Linux using its installer script. This method works on all Linux distributions including Debian, Ubuntu, CentOS, Red Hat, Fedora, Arch Linux, openSUSE, etc.

Before installing NetBeans, make sure you have JDK installed on your system. If it is not already installed, you can install it using the following commands:

On Debian-based distributions:

 sudo apt install -y openjdk-11-jdk 

On RHEL-based distributions:

 sudo yum install java-11-openjdk 

On Arch Linux:

 sudo pacman -S jdk-openjdk 

On openSUSE:

 wget https:
sudo rpm -ivh jdk-17_linux-x64_bin.rpm

Then to install NetBeans, download the installer script using the wget command:

 wget https: 

Make the installer script executable by running the following command:

 chmod +x 

Now run the installer script:

 sudo ./ 

It will open the installation wizard displaying the packages and runtimes that will be installed on your system. Click Next to initiate the installation process.

NetBeans installation wizard

On the next window, select the checkbox to accept the license agreement and click Next. Choose the installation folder for NetBeans and JDK and click Next. You can also leave the default location selected.

choose installation folder

Then it will show the summary of the installation for you to review. Click Install to proceed with the installation. Wait for the installation to complete and once done, click Finish.

finish the installation wizard

Uninstall NetBeans on Linux

To uninstall NetBeans from a Linux system, use the cd command to change the directory to the NetBeans installation directory, which in our case is /usr/local/netbeans-14/.

 cd /usr/local/netbeans-14/ 

Run the uninstall script by typing:

 sudo ./ 

Follow the prompts to uninstall NetBeans from your system completely.

Also, remove the installer script using the below command:

 sudo rm 

How to Install NetBeans From the Snap Store

You can also install NetBeans on Linux through Snap Store. However, for this, you will need to install snap on your Linux system. This method is valid for all Linux distributions that support snap.

To install NetBeans on any Linux distribution via snap, run the following command:

 sudo snap install netbeans  

Wait for the installation to complete. Once done, you should be able to launch NetBeans from the applications menu or by running the following command:


Uninstall the NetBeans Snap Package

You can easily remove NetBeans if you no longer need it. Use the following command to remove the NetBeans snap package:

 sudo snap remove netbeans 

Installing NetBeans Through Flatpak

Another easy and effective way to install NetBeans on Linux is to use Flatpak. Flatpak allows you to build, distribute, and run applications in an isolated environment.

First, you will need to install Flatpak on your Linux distribution. After installing Flatpak, add the Flathub repository to your system using the following command:

 flatpak remote-add --if-not-exists flathub https: 

Now run the following to install NetBeans using Flatpak:

 flatpak install flathub org.apache.netbeans 
install netbeans on Linux via flatpak-1

Uninstall the NetBeans Flatpak Package

To uninstall NetBeans, use the following command:

 flatpak remove org.apache.netbeans 

If prompted to confirm the uninstallation, type y, and press Enter. This should uninstall the NetBeans Flatpak package from your system.

Installing NetBeans on Ubuntu Graphically

You can also install NetBeans on Linux graphically using Ubuntu Software Center. To install NetBeans on Linux via GUI, open Software Center from the main applications menu in your system.

In the search field, type netbeans and press Enter. Then select the NetBeans IDE package in the search results by clicking on it.

install netbeans on linux via GUI

Click the Install button to begin the installation process. It will then ask for the password for authentication. Type the password and click Authenticate.

NetBeans in Ubuntu Software

Once the installation is complete, you can launch NetBeans from the main menu in the same way as you launch other applications.

To uninstall NetBeans, open Software Center and go to the Installed tab. From there, select the NetBeans package and click the Uninstall icon. Provide your password and it will remove the package from your system.

NetBeans Is a Great IDE for Java Developers

Whether you’re a beginner programmer or an experienced developer, NetBeans offers a wide range of tools and features to help you create high-quality Java-based applications. Given the various methods of installing NetBeans, you can pick the one that is convenient for you and works for your Linux distribution.

If you don’t plan to continue using NetBeans, you’re in luck, as there are several other IDEs and code editors available for Linux.


Source link

Leave a Reply

%d bloggers like this: