How To Install xnec2c on Ubuntu 18.04

In this tutorial we learn how to install xnec2c on Ubuntu 18.04. xnec2c is calculate and display radio antenna properties

Introduction

In this tutorial we learn how to install xnec2c on Ubuntu 18.04.

What is xnec2c

xnec2c is:

The original nec2c is a non-interactive command-line application that reads standard NEC2 input files and produces an output file with data requested by “commands” in the input file.

In contrast xnec2c is a GUI interactive application that (in its current form) reads NEC2 input files but presents output data in graphical form, e.g. as wire frame drawings of the radiation pattern or near E/H field, graphs of maximum gain, input impedance, vswr etc against frequency and simple rendering of the antenna structure, including color code representation of currents or charge densities. These results are only calculated and drawn on user demand via menu items or buttons, e.g. xnec2c is interactive and does not execute NEC2 “commands” in batch style as the original does.

There are three methods to install xnec2c on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install xnec2c Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install xnec2c using apt-get by running the following command:

sudo apt-get -y install xnec2c

Install xnec2c Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install xnec2c using apt by running the following command:

sudo apt -y install xnec2c

Install xnec2c Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install xnec2c using aptitude by running the following command:

sudo aptitude -y install xnec2c

How To Uninstall xnec2c on Ubuntu 18.04

To uninstall only the xnec2c package we can use the following command:

sudo apt-get remove xnec2c

Uninstall xnec2c And Its Dependencies

To uninstall xnec2c and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove xnec2c

Remove xnec2c Configurations and Data

To remove xnec2c configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge xnec2c

Remove xnec2c configuration, data, and all of its dependencies

We can use the following command to remove xnec2c configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge xnec2c

References

Summary

In this tutorial we learn how to install xnec2c package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.