MacPorts is a command path packet manager for macOS. If you know apt-get or yum Linux, then you know what a package manager does. Manage the download, installation, update and management of certain applications and their dependencies within macOS. With MacPorts, you can install Linux applications on macOS from the command path.
What can I install?
Most of these applications are open-code command path utilities, but there are a large number of “real” open-code GUI-based applications. as well as.
Like any package manager, MacPorts finds a library of downloadable software. When it finds what it needs, MacPorts downloads and installs the correct software and dependencies in the correct extension. This saves you the hassle of downloading GitHub repositories and building software from source packages while still having access to a wide array of the best Linux command path tools and GUI applications.
If you’ve been reading our Homebrew article, you’ll know that macOS lacks some “serial” Linux terminal commands out of the box. Mac users will not find common command path tools like nmap or wgety, and there is no native package manager on the Mac to provide them. You can still use MacPorts to install open source software like GIMP.
Installation of MacPorts
MacPorts requires the latest translation of Xcode for its operating system translation. You can download Xcode from the Mac App Store or the Apple Developer Website.
If you can successfully run most MacPort commands without Xcode, you won’t be able to run most packages until you install it.
Installing the Xcode expose tools
1. Open Terminal and use the following command to activate the macOS Developer Tools installation:
2. Click “Install” on the popup window.
3. Wait for the files to download and install.
Installing the MacPorts package
If you have already installed Xcode and the exposure tools, you can skip this step.
1. Download the latest version of MacPorts from GitHub. Be sure to scroll around below to designate the translation that matches your macOS translation. At the time of publication, there is no translation of MacPorts for Apple’s final operating system, High Sierra.
Related : How to change the desktop background with light and shadow modes in macOS Mojave
2. Install the package from your Downloads folder.
3. Bring up a new terminal window and run the port command.
If this command returns “MacPorts 2.4.1” and provides a slightly different command prompt, then you’re good to go!
Install Linux Applications with MacPorts
To install some Linux applications on macOS with MacPorts, we will first have to inquire the relevant programs.
1. To see a gigantic list of all available packages, open Terminal, type port list and press Enter.
3. Obviously, that’s a lot to see. We can use port search command to find specific bit. Let’s search for nmap using the following command:
4. This returns some matching packets. The first, simply called “nmap”, is the one we are looking for.
5. To get more information about this package, we can use the requested info:
6. This returns specific information about nmap. All this looks right, so we can install with the following command:
Note the sudo prefix which will require your administrator password to be activated.
7. Depending on the package you are installing, you may have a large set of dependencies. These are software packages that have the desired port based on them and you will need to install them with the port of your choice. Type “Y” and press “Enter” to accept the installation.
8. Once the installation is complete, you can run the command as you would on Linux via Terminal.
Conclution
MacPorts is a powerful package manager that will connect you with a wide range of binaries and open source applications that you can download and install on demand. If you want to learn more about the app controls, you can refer to the MacPorts guide for more information.