ns-3 is a discrete-event network simulator for Internet systems, targeted primarily for research and educational use. ns-3 is free software, licensed under the GNU GPLv2 license, and is publicly available for research, development, and use. ns-3 is intended as an eventual replacement for the popular ns-2 simulator. The project acronym “nsnam” derives historically from the concatenation of ns (network simulator) and NAM (network animator). In this tutorial, I will show you how to install ns3 on Ubuntu 22.04.
- Operating system: Ubuntu 22.04 or older versions with more than 2GB RAM
- Privileges: Check that you can run sudo commands.
Install ns3 Ubuntu 22.04
ns3 is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one you believe is simple and easy to follow.
Install ns3 using APT
This is one of the most popular methods for installing Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these steps to get ns3 on your Ubuntu 22.04.
Step 1: Update the APT database to download new packages from Ubuntu. Opening the terminal and executing this Linux command:
Step 2: Start the package installation on Ubuntu 22.04. After updating the system, you can install ns3 Ubuntu by pasting this command into the terminal and executing it.
Install ns3 using Aptitude
You must run this command to install Aptitude if you haven’t already done so on Ubuntu.
After that, you can now install ns3, just following these steps:
Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Opening the terminal and executing this Linux command:
Step 2: Start the package installation on Ubuntu 22.04. After updating, you can install ns3 Ubuntu by pasting this command into the terminal and executing it.
Uninstall ns3 on Ubuntu 22.04
Have you ever thought that uninstalling an application from Ubuntu might be challenging? You’re wrong; any program, not just a ns3, can be easily uninstalled by anyone.
This command can be used to uninstall ns3 from Ubuntu 22.04 if it was installed using APT or Aptitude.
You can also execute this command if you want to uninstall ns3 and remove its data and dependencies:
In this guide, I showed you ways to install ns3 on Ubuntu 22.04 and some ways to uninstall ns3 too. Please do not hesitate to contact me if you require any assistance. I’m delighted to respond to them.