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:
To verify the installation of JDK, run the following command:
If JDK is installed, the command will return the version in the output.
Now run the following command to download the NetBeans DEB package:
Then to install the NetBeans DEB package, run the following command:
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:
To remove the NetBeans DEB package as well, use the rm command followed by the package name:
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:
On RHEL-based distributions:
On Arch Linux:
On openSUSE:
Then to install NetBeans, download the installer script using the wget command:
Make the installer script executable by running the following command:
Now run the installer script:
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.
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.
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.
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/.
Run the uninstall script by typing:
Follow the prompts to uninstall NetBeans from your system completely.
Also, remove the installer script using the below command:
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:
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:
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:
Now run the following to install NetBeans using Flatpak:
Uninstall the NetBeans Flatpak Package
To uninstall NetBeans, use the following command:
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.
Click the Install button to begin the installation process. It will then ask for the password for authentication. Type the password and click Authenticate.
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.