How to Install Netbeans on a Linux
Last Updated :
23 Jul, 2025
NetBeans is an open-source Integrated Development Environment (IDE) primarily for Java programming, but it also supports various other programming languages. It is used to develop mobile applications, desktop applications, and web applications. This guide will help you install NetBeans on a Linux system using different methods.
Prerequisites
To install NetBeans, JDK is required. If you already have JDK, you can skip this installation step.
Step-By-Step Guide To Install Netbeans on a Linux
Installing JDK
1. Open the terminal and enter these commands:
sudo apt update
sudo apt install default-jdk
Installing NetBeans
Method 1: Using Binary Package
Download NetBeans:
- Open your browser, search for 'NetBeans download,' and click 'Download' in the first search result.
- Click on the "Download" button to download the latest release of NetBeans. If you want an older release, you can click on the "Find out more" button.
- Click on the link below the "Binary (Platform Independent)" and then click on the download link; the download will start.
download_link_pageExtract the Downloaded File:
- After completing the download, open the terminal and change the directory to the Downloads directory where the NetBeans ZIP file was downloaded.
Use the following commands:
cd ~/Downloads
unzip netbeans-{version}-bin.zip
Replace {version} with the actual version of the NetBeans ZIP file you downloaded (e.g., unzip netbeans-22-bin.zip).
Optional - Move the Extracted Folder:
- Move the extracted NetBeans folder to a preferred location.
Create a Desktop Shortcut and Add NetBeans to the Application Menu:
- Open Terminal and execute this command:
nano netbeans.desktop
Paste the following into the editor, replacing {netbeans_icon_path}
and {netbeans_execution_file_path}
with the actual paths:
[Desktop Entry]
Version=1.0
Type=Application
Name=NetBeans
Icon={netbeans_icon_path}
Exec={netbeans_execution_file_path}
Categories=Development;IDE;
Terminal=false
Save and exit the editor by pressing Ctrl + S and Ctrl + X.
Make the Desktop Entry File Executable:
- Copy the netbeans.desktop file to your desktop folder and make it executable:
chmod +x ~/Desktop/netbeans.desktop
- To add NetBeans to the application menu:
sudo cp ~/Desktop/netbeans.desktop /usr/share/applications/
To make desktop entry file in application menu executable: Change the path to ''/usr/share/applications" before running this command
Launch NetBeans:
- Launch NetBeans by clicking on the NetBeans icon on the desktop or in the application menu.
Method 2: Using APT Repository
- Add APT Repository:
- Open Terminal and enter this command
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ focal universe"
Update Packages List:
- Enter this command to update the packages list:
sudo apt update
Install NetBeans:
- Enter this command to install NetBeans:
sudo apt install netbeans
After executing this command, it will prompt you to continue. Enter 'Y' to proceed with the downloading process.
Launch NetBeans:
- Use the
netbeans
command or click the NetBeans icon in the application menu.
Method 3: Using Snap
Install NetBeans via Snap:
- Open Terminal and enter this command:
sudo snap install netbeans --classic
Launch NetBeans:
- Use the
netbeans
command or click the NetBeans icon in the application menu.
Method 4: Using Flatpak
- Install NetBeans via Flatpak:
- Open Terminal and enter this command:
flatpak install flathub org.apache.netbeans
- It will prompt you twice. Enter 'Y' to continue.
Launch NetBeans:
flatpak run org.apache.netbeans
lauch_netbeans_flatpakThese are the four ways you can install NetBeans on Linux.
Uninstalling NetBeans
Note: You can only uninstall NetBeans using the same method you used to install it; you cannot use a different method for uninstallation.
Using Binary Package
- Locate the Application Folder:
- Right-click on the NetBeans desktop shortcut, then select 'Open with', and choose your text editor.
- Find the execution path and copy it (e.g.,
/home/netbeans
).
- Remove the Application:
- Open Terminal and enter this command:
sudo rm -rf {paste_the_copied_path}
It will remove the application installed using Binary Package.
Using Snap
- Open Terminal and enter this command:
sudo snap remove netbeans
Using APT
- Open Terminal and enter this command:
sudo apt remove netbeans
Using Flatpak
- Open Terminal and enter these commands
flatpak uninstall org.apache.netbeans
flatpak uninstall --unused
Conclusion
In Linux, there are multiple methods to install NetBeans compared to Windows. Choose the method that best suits your needs and install NetBeans on your Linux system. We have covered four installation and uninstallation methods to guide you through the process. By following all the steps correctly, you can successfully install/uninstall NetBeans on your system. Explore NetBeans and start working on your projects.
Similar Reads
How to Install .NET on Linux? .NET is a free, cross-platform, open-source developer platform for building many different types of applications.With .NET you can build various kinds of applications including :Web ApplicationMobile AppsDesktop AppsGamesIOTYou can write .NET apps in one of the following languages :Â C#F#Visual basic
1 min read
How to Install Scala on Netbeans in Linux? NetBeans is Oracle's community-based Integrated Development Environment (IDE) for a variety of software development interests including Java, PHP, etc. It requires a JDK installation. Originally designed in Switzerland, Scala was released to the public in 2004 to address Javaâs famous verbosity Its
2 min read
How to Install NLTK on Linux? NLTK is Natural Language Tool Kit. It is used to build python programming. It helps to work with human languages data. It gives a very easy user interface. It supports classification, steaming, tagging, etc. In this article, we will look into the process of installing NLTK on Linux. Installing NLTK
1 min read
How To Install Maven On Linux? Maven is your software program development sidekick! Maven, crafted using the Apache Software Foundation, is the go-to device for simplifying the complex international of build automation and task management. It's designed to permit you to be conscious of coding while effortlessly managing obligatio
3 min read
How to Install Minecraft on Linux ? Minecraft is one of the most popular sandbox video games developed by Mojang, originally created by Markus "Notch" Persson using the Java programming language. If you're an experienced gamer or new to the Minecraft world, playing it on Linux is easy with the right instructions. Here, we will walk yo
3 min read
How to Install Node.js on Linux Installing Node.js on a Linux-based operating system can vary slightly depending on your distribution. This guide will walk you through various methods to install Node.js and npm (Node Package Manager) on Linux, whether using Ubuntu, Debian, or other distributions.PrerequisitesA Linux System: such a
6 min read